- Follow Programming with Jim on WordPress.com
Categories
Pages
Archives
- October 2023
- June 2023
- February 2023
- September 2022
- August 2022
- July 2022
- May 2022
- April 2022
- March 2022
- February 2022
- December 2021
- November 2021
- October 2021
- August 2021
- July 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- September 2020
- May 2020
- September 2018
- August 2018
- March 2018
- November 2017
- August 2017
- July 2017
- June 2017
- February 2017
- December 2016
- November 2016
- October 2016
- September 2016
- July 2016
Monthly Archives: November 2021
json-shootout Rust/simd-json
I just merged Erik’s implementation of json-shootout in Rust, using the simd-json crate. Here’s a table of the results of the benchmarks implemented so far: Language/Library Parse Time Memory Used Access Time python 0.6771s 135940kB 0.0346s C/cJSON 0.2322s 149548kB 550.2047s … Continue reading
Posted in Uncategorized
Tagged json-shootout, rust programming language, simd-json, sxe-jitson
Leave a comment
sxe-jitson-to-json and sxe-factory
I just added two new modules to libsxe: sxe-factory and sxe-jitson-to-json. sxe-factory is a generic object that allows an arbitrary binary sequence to be constructed in dynamically grown memory allocated from the heap. It’s used by sxe-jitson-to-json to build a … Continue reading
What Programming Languages are Worth Learning?
I just took a look at the Tiobe Index, which ranks programming language popularity based on Stack Overflow, Github, and other sources. How things have changed since 2017, when I wrote Go is in the Top 10, According to Tiobe. Here … Continue reading
Benchmark of golang’s JSON Parser
I just implemented the json-shootout benchmark in golang, using the builtin JSON parser. The code is here: https://github.com/jimbelton/json-shootout/blob/master/json-golang.go Here are the results: jim@noatun:~/Source/json-shootout$ go run json-golang.goLoaded dictionary in 0.611037248s, size 126112kBLooked up all keys in dictionary in 0.01396387 Here are … Continue reading
Installing golang on Linux
Installing golang on linux is easy: Go to the golang downloads page and download the latest linux tarball: https://golang.org/dl/ Run: sudo tar -xzf -C /usr/local -f ~/Downloads/go1.17.3.linux-amd64.tar.gz Edit ~/.profile and add a line: PATH=$PATH:/usr/local/go/bin Just this once, source the file: … Continue reading
XX3 64 Bit Hash is Very Fast
Using lookup3, the sxe-jitson benchmark is much quicker: Loaded dictionary in 0.111029s, size 47346kBFirst access in 0.009391s, size 47813kBLooked up all keys in dictionary in 0.034964s Switching the hashing algorithm to XXH32 makes sxe-jitson even faster: Loaded dictionary in 0.118541s, … Continue reading
sxe-jitson: Just In Time Indexing
I began this hack because I wanted a JSON parser that was fast and memory efficient, and yet allowed the parsed objects it produced to be accessed very quickly. One of the things I’ve noticed about systems that use JSON … Continue reading
sxe-jitson: A Minor Update
At the suggestion of Vinnie Parla, I switched from duplicating the stack after parsing JSON to reallocing the parsed JSON to size and returning it. This improved the speed that sxe-jitson is able to parse. The latest code is at: … Continue reading
First Benchmarks for sxe-jitson
I just update json-shootout to benchmark sxe-jitson. You can find it here: https://github.com/jimbelton/json-shootout. To build the sxe-jitson benchmark, you need to download sxe and build sxe/libsxe (with make release), and the sxe and json-shootout directories must be in the same … Continue reading
sxe-jitson Accessor Functions
I just added functions for getting the size of a parsed JSON string (number of characters), array (number of elements), or object (number of members). As well, I’ve added functions to get a member of an object by name and … Continue reading