Generally I started to learn Python, because I thought it was a fast language, now I have doubts.
The simplest test I came up with was to display a million numbers, a loop for. It seems that if Python is faster (3.7) then measuring the time of application execution will give us a good result or very close.
Additionally I wanted to test Cython as a way to compile Python code to C / C++.
PHP 7.3 with OPCache: 2.971832036972
HipHop VM 4.33.0 (PHP-like language) [hhvm --hphp -thhbc -o test test.hack] [hhvm -vRepo.Authoritative=true -vRepo.Central.Path=test/hhvm.hhbc test.php]: 2.8321220874786
Cython [cython --embed -o test.c test.py] [gcc -Ofast -I /usr/include/python3.7m -o hello test.c -lpython3.7m -lpthread -lm -lutil -ldl]: 5.94274377822876 (WTF?)
I wonder why there's such a difference in performance. I know that PHP is still optimized (e.g. the old rand function has been replaced with a new one, which is not only faster, but also gives better results) - it seems that the developers of PHP want to fight Python, but I didn't expect it to be a fairly fast language.
I'm gonna do more tests because the subject is interesting.