Marko Rauhamaa <ma...@pacujo.net> writes: > Alain Ketterlin <al...@dpt-info.u-strasbg.fr>: > >> The real nice thing that makes Julia a different language is the >> optional static typing, which the JIT can use to produce efficient code. >> It's the only meaningful difference with the current state of python. > > I'm guessing the two main performance roadblocks for Python are: > > 1. The dot notation is a hash table lookup instead of a fixed offset to > a vector. > > 2. The creation of a class instance generates a set of trampolines for > all methods. The trampolines are ordinary fields that can be > overridden.
Do you suggest this as a checklist to decide whether Python is the appropriate language for a task? ("Do you really need any of these? If yes, use python.") > Both features are critical to Python's "sex appeal;" I wouldn't give > them up for performance gains. There are cases where performance matters (especially, when it is directly related to your electricity bill). > Producing an effective JIT for Python seems like a formidable challenge > but not impossible in principle. After all, the developer *could* > provide that static typing information in, like, 99.9% of the code. Not 99% of the code; the code that runs 99% of the time. > That would be feat worthy of a Millennium Technology Prize. Here is a fairly interesting blog post about what the WebKit developpers do for javascript (including profile-directed type inference, as they call it): https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ -- Alain. -- https://mail.python.org/mailman/listinfo/python-list