Hacker News new | ask | show | jobs
by pecg 2892 days ago
> The other knock on ada was it was slow.

I'm curious, is the compilation time that takes too much, or is it the execution time? I'm really interested in learning the language, but I don't want to end-up with programs that generate slower native code, compared to that of C. What's your experience with it?

2 comments

It's not any slower than C. In some cases the compiler can actually generate better code because of stricter rules on pointer aliasing. You can also do more with only stack allocation in Ada, which is a huge win.

It does generate some extra code for things like range checks and checking invariants, i.e. things you can skip in C to write buggy code.

There's a little benchmark project here: https://github.com/frol/completely-unscientific-benchmarks

The Ada implementation is the second fastest behind C++.