dyu/ffi-overhead
View on GitHub ↗ ★ 699 C
comparing the c ffi (foreign function interface) overhead on various programming languages
28 mentions on Hacker News by 25 people: 4 stories, 24 comments · first 2014-04-08 · latest 2025-11-23
20082026
-
…compare to C. gccgo is not listed there but from my own testing it's the same as C/C++. [0]: https://github.com/dyu/ffi-overhead
comment by syockit · 2025-11-23 · in GCC SC approves inclusion of Algol 68 Front End -
The overhead for Go in benchmarks is insane in contrast to other languages - https://github.com/dyu/ffi-overhead Are there reasons why Go does not copy what Julia does?
comment by JanisErdmanis · 2024-04-27 · in Leaving Rust gamedev after 3 years -
…performance/zero-overhead-FFI[2] it really is a neat language. [1] https://luajit.org/ [2] https://github.com/dyu/ffi-overhead
comment by vvanders · 2023-05-28 · in Lua: The Little Language That Could -
…compiled language like C because you can optimize away some of the bindings at the runtime right? https://github.com/dyu/ffi-overhead is a measurement of that, and you see LuaJIT and Julia as faster than C and Fortran here. This shouldn't…
comment by ChrisRackauckas · 2023-05-02 · in Can Fortran survive another 15 years? -
…take some hit for using an FFI. So you're still incentivized to avoid tons of SQLite calls. https://github.com/dyu/ffi-overhead
comment by eatonphil · 2023-01-02 · in Understanding the N + 1 queries problem -
…the results look outdated. The Dart results look bad (25x slower than C), but looking at the code ( https://github.com/dyu/ffi-overhead/tree/master/dart ) it appears to be five years old. Dart has a new FFI as of Dart 2.5 (2019):…
comment by haberman · 2022-05-14 · in Comparing the C FFI overhead on various languages -
…but you can find a PR claiming it has 123,198ms. That would be a worst one by a wide margin. https://github.com/dyu/ffi-overhead/pull/18
comment by tomas789 · 2022-05-14 · in Comparing the C FFI overhead on various languages -
…of calls across the cgo barrier is quite high, which can have API architecture implications -- https://github.com/dyu/ffi-overhead#results-500m-calls .
comment by nikki93 · 2021-08-24 · in Why Is SQLite Coded in C (2017) -
…things. For example, FFI calls into shared libraries is generally faster with fast JIT languages. https://github.com/dyu/ffi-overhead This is one reason why you could see Julia outperforming Fortran in some cases where the FFI speed…
comment by ChrisRackauckas · 2020-10-29 · in Julia: Dynamism and Performance Reconciled by Design (2018) -
> C interop is simple and elegant C interop in go is super slow: https://github.com/dyu/ffi-overhead
comment by Rotareti · 2019-11-17 · in The Value in Go’s Simplicity -
…Golang's poor FFI performance is the number 1 reason I wouldn't use it for my own projects. [0]: https://github.com/dyu/ffi-overhead
comment by Rotareti · 2019-08-12 · in Python Is Eating the World -
…there are plenty of questions about embedding Julia into C/C++[2][3]. May be similar for Rust. [0] https://github.com/dyu/ffi-overhead [1] https://github.com/robsmith11/fastfloat [2] https://discourse.julialang.org/t/support-with-embedding-…
comment by celrod · 2019-02-11 · in Why Swift for TensorFlow? -
…to produce libraries. One interesting datapoint is that Julia's C FFI is faster than that of C++... https://github.com/dyu/ffi-overhead (For those interested, the order of the first few languages is: lua-jit, julia, c(!), c++, zig, nim, d…
comment by Recurecur · 2019-01-11 · in High Performance Numeric Programming with Swift: Explorations and Reflections -
…thing. I mean the nice thing about Love2d is that LuaJIT has the best ffi overhead when calling C. https://github.com/dyu/ffi-overhead
comment by pasabagi · 2018-11-11 · in Nine years of Go -
…an extremely efficient C FFI, so mixing Rust and Julia (for instance) would be painless if needed. https://github.com/dyu/ffi-overhead It's a great time to be a software developer, and things will only get better as languages and tooling…
comment by Accipitriform · 2018-10-11 · in A Rust FFI adventure in unsafety -
…lot of interesting discussion of go ffi: https://github.com/golang/go/issues/16051 these benchmarks https://github.com/dyu/ffi-overhead seem to show that a c call via cgo will be about 14 (!) times slower than a c call from c# in mono,…
comment by dilap · 2018-07-18 · in Getting to Go: Garbage collection and runtime issues -
Great ffi perf too! From the benchmark over at github.com/dyu/ffi-overhead, julia is on par with luajit.
comment by dyu- · 2018-06-01 · in My favorite things that are coming with Julia 1.0 -
[Here's a C# example]( https://github.com/dyu/ffi-overhead/pull/10 ).
comment by calvin_ · 2018-05-27 · in Comparing the C FFI overhead in various programming languages -
…case it might have something to do with not using the C int types (PR already open to fix this: https://github.com/dyu/ffi-overhead/pull/6 )
comment by dom96 · 2018-05-27 · in Comparing the C FFI overhead in various programming languages -
…good thing to keep in mind for anybody looking at the project and making judgement calls off of it. https://github.com/dyu/ffi-overhead/issues I didn't do so because it wasn't my idea. I certainly don't mind though.
comment by exikyut · 2018-05-27 · in Comparing the C FFI overhead in various programming languages -
Well, see my issue: https://github.com/dyu/ffi-overhead/issues/2
comment by Xeoncross · 2018-02-02 · in Writing space invaders with Go -
…at a certain level, due to the amount of opengl calls you have to make. Is this still the case? [1] https://github.com/dyu/ffi-overhead/blob/master/README.md
comment by rileyphone · 2018-02-02 · in Writing space invaders with Go -
…example: // plusone is the ffi int x = 0; while (x < 2000000000) x = plusone(x); Here's the source https://github.com/dyu/ffi-overhead With other programming languages: c: 4778 nim: 4746 rust: 5331 java7: 17922 java8: 17992 go: 130105…
comment by dyu- · 2017-02-17 · in Go 1.8 Release Notes -
…significant performance problem elsewhere, so this is something that cannot be simply ignored. [1] https://github.com/dyu/ffi-overhead
comment by pbsd · 2014-04-08 · in The Heartbleed Bug