4 ms·
I was curious about Common Lisp's CFFI also, so I tried it out. [1] On my machine, the C version prints between 6855 and 6910. Using SBCL (cffi-bench:run 2000
by jlarocco 8y ago
I was curious about Common Lisp's CFFI also, so I tried it out. [1]
On my machine, the C version prints between 6855 and 6910.
Using SBCL (cffi-bench:run 2000000000) prints between 9185 and 9205.
Clisp is significantly slower, and (cffi-bench:run 200000000) is already at 55500, compared to ~100 in SBCL.
CCL crashes with a segmentation fault, and I'm still debugging.
Tomorrow I'll see about creating a build script and opening a pull request to the main repo.
[1] https://github.com/jl2/ffi-overhead/tree/master/common-lisp/cffi-bench/cffi-bench.lisp https://github.com/jl2/ffi-overhead/tree/master/common-lisp/...
EDIT: I recompiled the .so and C program with -O3, and it now prints between 4740-4780. SBCL using the -O3 library prints 7935 and 8935.
- nabla9 8y agoIf we use the C performance ratio between the machines to adjust machine to machine comparisons. SBCL would be around 1600 in the original benchmark, between D and Java.