Giter VIP home page Giter VIP logo

csv-reader-race's Introduction

The Great CSV Reader Race

May the fastest parser win; may the most useful attain glory.

Contributions are welcome! Just make a pull request.

Rules

  1. The parsed result must be correct. Correctness is judget by the output from R's read.csv which is nothing if not battle tested. If the output is different, the entry is invalidated.
  2. I am the umpire and my computer is the official test machine. It must
  3. All entries must include instructions to run them, and instructions for installing dependencies. They don't necessarily need to be cross-platform, but they do need to run on El Capitan. See Rule #2.

Todos

  • ☐ Adhere to my own rules and add installation/execution instructions for the scripts I have here.
  • ☐ Add a correctness-checking script.
  • ☐ Add a versioning/naming system for entries.
  • ☐ Add a script to generate the data.
  • ☐ Add more/better data sets to test against.
  • ☐ Add a fair system for doing multiple runs.

Method

Each function lives in a separate file. Each is timed using its language's native timing features.

Data

The test data set is the famous "iris" data set, repeated 13001 times. This produces a data set that is 1950150 rows and 5 columns, and about 59 megabytes in size.

Setup

  • Early 2015 MacBook Pro

    • 2.7 GHz Intel Core i5 processor
    • 16 GB 1867 MHz DDR3 RAM
    • Mac OS version 10.11.6
  • R version 3.3.1

    • data.table version 1.9.6
  • Python version 3.5.2

    • Pandas version 0.18.1

Results

  • R data.table::fread(): 0.978 seconds
  • Python csv.reader(): 3.754 seconds
  • Python pandas.read_csv(): 1.445 seconds

csv-reader-race's People

Stargazers

 avatar

Watchers

 avatar  avatar  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.