GithubHelp home page GithubHelp logo

kitrio / billion_row_challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myyrakle/billion_row_challenge

0.0 0.0 0.0 76 KB

10억줄 처리 챌린지

License: MIT License

Shell 2.33% JavaScript 8.73% C++ 18.34% Python 7.84% Java 4.87% Go 25.40% C# 3.42% Rust 29.08%

billion_row_challenge's Introduction

billion row challenge

Rust, Go, Node.js, Python, Java 등의 언어로 진행하는 10억개 데이터 처리 챌린지입니다.

  1. setup.sh를 실행해서 테스트 데이터를 생성합니다. (17GB 정도의 크기입니다.)
  2. 입력 데이터 파일에는 다음과 같이 지역과 측정값 쌍이 개행으로 구분된 채로 들어있습니다. 숫자는 정수 값입니다.
Prico;458634
Canada;780790
Central;798387
Athens;799643
Boa Vista;75486
  1. 해당 파일을 읽어서 지역명을 기준으로 최댓값, 최솟값, 개수, 총합, 평균값을 구하세요.
  2. 나눗셈을 할 경우 integer 연산으로 나머지는 버립니다.
  3. 지역명을 기준으로 오름차순 정렬을 합니다.
  4. 기대하는 출력 형태는 다음과 같습니다. 지역명=최솟값;최댓값;평균값(총합/개수)
Adenarith=1;9999999;5000594(4716533623284/9431947)
Amsterdam=4;9999999;4999133(4715142248923/9431920)
Anápolis=0;9999999;4999550(4718363502090/9437576)

제한

  • 일반적인 상용 컴퓨팅 환경에서 동작해야 합니다. x86, linux. RAM 32GB
  • 하지만 unsafe나 트리키한 흑마술들은 사용 가능합니다.

Rust

버전은 1.77.0입니다.

  1. rust 경로에 추가 프로젝트를 구성합니다. basic을 복사해도 되고, cargo new로 생성해도 됩니다.

Go

버전은 Go 1.22.2 입니다.

  1. go/cmd 경로에 새 폴더를 만듭니다.
  2. go/cmd/basic/main.go 파일을 복사한 뒤에 수정해서 최적화합니다.

Node.js

버전은 v18.19.0입니다.

  1. nodejs 경로에 새 파일을 만듭니다.
  2. nodejs/basic.js 파일을 복사한 뒤에 수정해서 최적화합니다.

Python

버전은 Python 3.10.12입니다.

  1. python 경로에 새 파일을 만듭니다.

Java

버전은 openjdk 11.0.22입니다.

  1. java 경로에 새 폴더를 만들고 프로젝트를 구성합니다.

C++

버전은 G++ 11.4.0입니다.

  1. cpp 경로에 새 폴더를 만들고 프로젝트를 구성합니다.

C#

버전은 dotnet 8.0.103입니다.

  1. c# 경로에 새 폴더를 만들고 프로젝트를 구성합니다.
    • dotnet new로 직접 생성해도 좋고,
    • basic을 복제해서 사용해도 좋습니다.

현재 결과,,,,,,

Rank Lang Code time
1 C++ libertyrapid1 3272ms
2 Go lemon-mint1 6113ms
3 Rust whitetac1 8046ms
4 Rust Basic 128293ms
5 Java Basic 184825ms
6 C++ Basic 190039ms
7 Go Basic 191004ms
8 C# Basic 215245ms
9 Node.js sunrabbit1 593877ms
10 Python Basic 936269ms
11 Node.js Basic 1262149ms

Reference

billion_row_challenge's People

Contributors

myyrakle avatar lemon-mint avatar stat-pan avatar hmluck83 avatar liberty-rapid avatar boxqkrtm avatar sunrabbit123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.