I have a library which is written in C++, and I wrote a NIF “bridge” for it.
When I bench marked the library in C++, it had
Then I bench marked it in
Elixir, the result surprised me and it reached minimum
I couldn’t believe my eyes so I spinning a drogon http server to battle with
And the results from the two stay pretty much the same ~400 rps vs ~3k-6k rps.
How come a native C++ call is MUCH slower than the one from Elixir NIF?