Skip to content
This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Python Erlang
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
citylots-less.json
example.json
jsontest.py
rebar
rebar.config

README.md

jsontest

https://kivikakk.ee/2013/05/20/erlang_is_slow.html

tl;dr: results

Average speed to parse 5.9MiB JSON payload 10x, sorted by time ascending:

  • Python ujson: 1,160ms
  • Erlang jiffy: 1,271ms
  • Python simplejson (with C): 1,561ms
  • Python json: 2,378ms
  • Erlang mochijson2: 8,692ms
  • Erlang mochijson: 11,111ms
  • Python simplejson (no C): 16,805ms

DIY

Here's the source used to run the speed comparison tests.

For the Erlang libraries,

# one-time setup:
./rebar get-deps
./rebar compile

Then you can run the tests:

./rebar eunit skip_deps=true

For the Python stuff, ensure you have simplejson installed (and check that you have a recent version with C speedups) and run:

python jsontest.py

Check jsontest.py's header docstring for info on getting simplejson, and disabling/enabling speedups.

Thanks

The dataset is a reduction of the large JSON blob available at https://github.com/zeMirco/sf-city-lots-json.

You can’t perform that action at this time.