4 ms·
But you have to take these results with a grain of salt. Both the Perl and Python tests are implementing binary trees in vanilla Perl and Python. Both Perl and
by weare138 5y ago
But you have to take these results with a grain of salt. Both the Perl and Python tests are implementing binary trees in vanilla Perl and Python. Both Perl and Python have performant libraries written in C which is what you would use in a situation like this.
- jhgb 5y ago> Both the Perl and Python tests are implementing binary trees in vanilla Perl and Python. Well, that's how you judge a language. You write code in it, as opposed to writing it in some different language not under consideration. But a much worse problem seems to be the fact that binary-trees is not much of a representative benchmark. It's mostly a benchmark of your memory management. Unless your programs spend 80% of their time managing memory, they'll probably not match the results of binary-trees.
- emilper 5y agothat is _not_ how you judge a _scripting_ language it is trivial* to add C code to Perl, even when using XS, I guess it is as easy to do the same for Python if you do heavy computations in pure Perl5 or pure Python you're doing it wrong by definition *assuming you can write C