Giter Site home page Giter Site logo

jjghockey / data.table-benchmarking Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 412 KB

A benchmarking test between data.table functions and equivalent dplyr functions.

License: GNU General Public License v3.0

R 100.00%
data-table dplyr r benchmark benchmarking american-community-survey

data.table-benchmarking's Introduction

data.table-benchmarking

A benchmarking test between data.table functions and equivalent dplyr functions.

001_mk_data.r -

Captures data from the American Community Survey (https://www.census.gov/programs-surveys/acs/). This data is not being analyzed. It is used as dummy data to test the efficiency of data.table functions versus dplyr functions. This process creates a new file called 001_acs.rds. This file is too large for github. Thus it is not saved.

002_an_bmarkDT.r, 003_an_bmarkDP.r -

Executes a series of common data processing, manipulation, and aggegration commands. The following commands are executed:

  1. Write operations

  2. Read operations

  3. Data Conversion (using lubridate, as.POSIXct)

  4. String Regex manipulation

  5. Joins

  6. Aggregation

Each series of commands is performed 30 times each on the ACS data that has been expanded to be approximately 6 GB in storage space. The expanded ACS data had approximately 25 Million rows of data. The Write operations create a new file called tmp.csv (which is read in during the Read operations). The tmp.csv file is not saved, as it is too large for github.

All benchmarking was done in sequence starting with data.table first and then dplyr second. Sessions were run on a server running Microsoft R (MRAN), with 8 cores and 64 GB of RAM. Sessions were run during minimal server load in which only the benchmarking commands were being performed.

004_an_summary.r -

Summarizes the comparison between data.table and dplyr for each of the command types executed.

005_run_all.r -

source() executes each r script (002, 003, and 004)

data.table-benchmarking's People

Contributors

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