Hacker News new | ask | show | jobs
by askyourmother 3679 days ago
Use C or C++ instead?
1 comments

RTFA dude. The end product was _faster_ than C.
Is it still faster than C with this mistake fixed? https://news.ycombinator.com/item?id=11713486
> _faster_ than C

How do you know? There is no data on the respective machines and environments. A number from a tweet and a number from a blog post do not make such data.

Performance test run on Travis CI in a virtual machine https://travis-ci.org/mzaks/FlatBuffersSwift

function called for decode+use+dealloc https://github.com/mzaks/FlatBuffersSwift/blob/master/FlatBu...

function called for direct: https://github.com/mzaks/FlatBuffersSwift/blob/master/FlatBu...

function called for using struct: https://github.com/mzaks/FlatBuffersSwift/blob/master/FlatBu...

Everything is on Github, you are welcome to try it out on your own machine.

...after a ton of ugly workarounds and optimizations. I wonder how much slower than C a straight C++ port would be.