-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What about Ada? #15
Comments
Well, I forget that C++ has references not only pointers. Can C++ reference arguments be passed through registers? If so, C++ probably has the same performance as Ada. See also: https://groups.google.com/forum/#!topic/comp.lang.ada/eFNW9PyWdPM |
Someone Guillaume Foliard has written the Ada code. And yes, this code is much faster than C++. Please add the Ada code to your benchmark. (I could do it with Git myself, but I am busy with other, more important projects.) https://groups.google.com/forum/#!topic/comp.lang.ada/Qcaio8hrAyo Ada: C++: |
I do not think anyone in economics uses ADA. While it may be an Thanks for the suggestion On 7/4/14, 12:40 PM, Victor Porton wrote:
Jesús Fernández-Villaverde 君臣上下貴賤皆從法,此謂為大治 |
What about Ada?
I suspect it is a little faster than C++, mainly thanks to explicit parameter modes (what may allow to use registers for in-out parameters) instead of how C++ pass pointers for the same deal (and the compiler cannot be sure that the pointer is not null and that registers can be used instead).
However Ada has the drawback of storing two integers with each array (to maintain its range). In principle, this can be get rid of with an optimizing compiler which would not store the lowest index of an array, provided that this index can be restored from a record discriminant. This can be used for creating optimizing collections, which are faster than plain arrays. (I don't know whether this my optimization idea for Ada is already implemented.)
The text was updated successfully, but these errors were encountered: