NationalSecurityAgency / lemongraph

Log-based transactional graph engine
Other
1.14k stars 149 forks source link

WIP: c-api 5-6x faster than pypy2, updated examples & benchmarks #33

Closed d4tocchini closed 3 years ago

d4tocchini commented 4 years ago

IMPORTANT: a WIP, but nearing primetime, till then forgive the debug leftovers, and feedback / comments appreciated :)

make build
make run-bench.c # run c benchmark
make run-example.c # run c example

The c-api, when emulating the python binding lib call signatures, reaps a meager ~2x perf win over pypy2. By removing mallocs from hot looped functions I'm seeing a 5-6x perf boost and insertion rates of 1.2+M/s for nodes, props and edges.
Using MacOS 10.15, 3.1GHz quad i7, 16GB RAM

Biggest issue I'm facing is naming convention to assist in expanding lower-level apis, ugh...

This PR is derived from my efforts integrating lemongraph in a large node.js & electron project, JS bindings should be a fast follow up...