4 ms·
Running the same algorithm in my system, C/C++ with -O3 are almost equivalent, and Crystal too: Clang C++ 1.069s C++ 4.2.1 1.075s Crystal
by mromanuk 8y ago
Running the same algorithm in my system, C/C++ with -O3 are almost equivalent, and Crystal too:
Clang C++ 1.069s
C++ 4.2.1 1.075s
Crystal 1.082s
But using a different algorithm (non–recursive) in C++ (http://rextester.com/discussion/OGIF47151/fibonacci http://rextester.com/discussion/OGIF47151/fibonacci) you can achieve
C++ 4.2.1 0.005s
someone should port it to Crystal :)