Re:Comparing the C FFI overhead in various programming langu...
by nabla9 on Sunday May 27, 2018 @06:31AM
(#17166328)
If 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.
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/...
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.