Code Monkey home page Code Monkey logo

billion_row_challenge's Introduction

billion row challenge

Rust, Go, Node.js 등의 언어로 진행하는 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)

제한

  • 해당 언어 안에서 모든 것이 완료되어야 합니다. FFI 같은 것은 반칙입니다.
  • 일반적인 상용 컴퓨팅 환경에서 동작해야 합니다. 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 파일을 복사한 뒤에 수정해서 최적화합니다.

현재 결과

Rank Lang Sample time
1 Go lemon-mint1 5736ms
2 Rust Basic 127043ms
3 Go Basic 204525ms
4 Node.js Basic 1269280ms

Reference

billion_row_challenge's People

Contributors

myyrakle avatar lemon-mint 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.