3 ms·
Do you have any specific publicity available code which you claim is too slow in python? Otherwise, I don't believe you. For example, hg is now faster than gi
by illumen 12y ago
Do you have any specific publicity available code which you claim is too slow in python? Otherwise, I don't believe you.
For example, hg is now faster than git. Git is written by great C hackers (including Linus no less), and yet hg is faster than git. See the facebook benchmarks for evidence.
Python has static checking of interfaces, and types if you want. It also has IDEs which can check a lot of things for you. It turns out that dynamic typed languages can be checked for quite a lot of things.
Check out using mmap based datastructures to do shared memory between workers.
- adwn 12y ago> For example, hg is now faster than git. You're comparing the runtimes of two different algorithms, so your results are inevitably meaningless. > It turns out that dynamic typed languages can be checked for quite a lot of things. And yet, statically typed languages can still be checked for a lot more things.
- illumen 12y ago'And yet, statically typed languages can still be checked for a lot more things.' What is your evidence? Can you provide a citation? Modern tools can statically check python for a lot of things. Here are some things you can statically check with python: * implements an interface * unused names * assigned but never used There's hundreds more things you can check for with tools like pylint and some of the IDEs. That 'implements an interface' one is important. Since with interfaces you can specify things like return types, and type arguments. There are also @param markers in doc strings, where you can specify argument and return types. These can be used by tools like IDEs (eg pycharm) and other static checkers. Full program type inference is now doable for large parts of python. See the shedskin, and Rpython restricted subsets for two implementations.
- coldtea 12y agoFrom Mercurial's website: >most of Mercurial is written in Python, with a small part in portable C for performance reasons.