News for hackers. Stuff that matters.
Re:How to Use the Foreign Function API in Java 22 to Call C ... by p0w3n3d on Wednesday May 08, 2024 @05:50PM (#40303043)
You're are (or were) right. Java has (had) an awful performance of a foreign API call, and I wonder was this fixed in this release, because as I heard, fixing it was the main reason of the upcoming functionality
Re:How to Use the Foreign Function API in Java 22 to Call C ... by neonsunset on Wednesday May 08, 2024 @06:03PM (#40303172)
It could bring Java closer in FFI overhead but not necessarily match. There are still missing features like structs, C pointers (though in C# they are superseded quite a bit by byrefs aka `ref T` syntax, e.g. used by Span<T>), stack allocated buffers, etc.

C# also has function pointers (managed/unmanaged) and C exports with NativeAOT.