News for hackers. Stuff that matters.
Re:Comparing the C FFI overhead on various languages by exebook on Saturday May 14, 2022 @08:54AM (#31377458)
I developed a terminal emulator, file manager and text editor Deodar 8 years ago in JavaScript/V8 with native C++ calls, it worked but I was extremely disappointed by speed, it felt so slow like you need to do a passport control each time you call a C++ function.
Re:Comparing the C FFI overhead on various languages by Koromix on Saturday May 14, 2022 @10:25AM (#31378205)
The official solutions, node-ffi and node-ffi-napi, are extremely slow, with an overhead hundred of times higher than it should be. I don't know what they do to be so slow.

I'm making my own FFI module for Node.js, Koffi, as a much faster alternative. You can see some benchmark here, to compare with node-ffi-napi: https://www.npmjs.com/package/koffi#benchmarks

Re:Comparing the C FFI overhead on various languages by SemanticStrengh on Saturday May 14, 2022 @10:50AM (#31378494)
An interesting alternative would be to not have any FFI and to use transparent polyglot interop between javascript and c++ via GraalJs /sulong
Re:Comparing the C FFI overhead on various languages by exikyut on Saturday May 14, 2022 @09:58AM (#31377977)
Oh nice, with a Norton Commander-alike terminal UI.

Screenshots at https://sourceforge.net/projects/deodar/

Last-modified 2018 over at https://github.com/exebook/deodar

I'm not sure where the use of Yacc ends and https://github.com/exebook/elfu begins in the .yy files (which are sprinkled with very algebraic-looking Unicode throughout). The Pascal-like class definitions may be defined in https://github.com/exebook/intervision.

Very interesting project.

Re:Comparing the C FFI overhead on various languages by ZiiS on Saturday May 14, 2022 @09:25AM (#31377707)
Probably butter smooth after eight years of V8 development and Moore's Law (well whatever passes for it now).
Re:Comparing the C FFI overhead on various languages by kllrnohj on Saturday May 14, 2022 @09:37AM (#31377794)
Probably not since single threaded improvement has barely advanced over the last 8 years, and JS/V8 are still in a single threaded world that stopped existing a decade ago.