4 ms·
> In theory, it's just as fast as C/C++, when you compare GNAT against GCC/G++. Is this the same theory that makes java is just as fast? Ie, if I wrote idiomat
by flukus 10y ago
> In theory, it's just as fast as C/C++, when you compare GNAT against GCC/G++.
Is this the same theory that makes java is just as fast? Ie, if I wrote idiomatic Ada would the levels of indirection (pointers to pointers to pointers and virtual functions everywhere) by more like c or more like java?
- Raphael_Amiard 10y agoWell, yes and no :) Ada is very close to C++ in terms of runtime abstraction, unlike Java, so it's not relying so much on the "sufficiently smart compiler" fallacy. Also, there are several idiomatic dialects of Ada, because Ada has a facility to deactivate language features at compile time. Some people in safety critical don't want any dispatch for example. FWIW I ported a quite large code base from C++ to Ada so I'm have first hand experience with this.