5 ms·
Please don't assume that I've never used languages like Common Lisp or Smalltalk because it's not true. I'm well aware that you can optimize code in a highly d
by eigenspace 3y ago
Please don't assume that I've never used languages like Common Lisp or Smalltalk because it's not true.
I'm well aware that you can optimize code in a highly dynamic language (I'm mainly a julia programmer afterall).
The problem with Python isn't dynamism, it's the way the dynamism was baked into the language, and the very leaky way it affects the language semantics.
- pjmlp 3y agoI did not assume, just it keeps being a common argument, when those languages go beyond Python and yet offer very capable JITs. As mentioned, imagine having something like the Smalltalk becomes:, where in a flip second, all occurrences of type A turn into B, across the whole application, including already JITed. Or stopping the application at any given moment, recode something, hit continue, and the application carries on, as if it was the original implementation to start with. Or given they were full workstation OSes, apply such dynamism to the kernel level code.
- eigenspace 3y agoLet me ask you this: Do you think that the is a reason there's no widespread whole-language, high performance JIT compiler for Python despite there being so much interest in such a compiler? Do you think that people just haven't tried hard enough?
- pjmlp 3y agoIt requires Xerox PARC money to keep it going, and not many companies are that interested. Facebook was interested into doing the work for PHP. Shopify is interested into doing the work for Ruby. Google was interested for a moment, but then instead of spending money on Unladen Swallow, they decided to port Python code into Go instead. NVidia is interested, but only to the point it is a JIT for CUDA workflows. Now finally Microsoft and Facebook, seem to be willing to invest into Python, so lets see if this time how long they will care. Interest alone doesn't make it happen, money, people and management willing to wait, make it happen. GraalVM would never have happened, if Sun or Oracle had killed MaximeVM after almost a decade of research work.
- npalli 3y agoHow much did HHVM or Shopify's YJIT help PHP and Ruby? My sense (could be wrong) is it was in the mere 10's of percentage points (30-40% improvement). Given these languages can be 100 to 1000x slower, it just proves the point that getting real performance improvements (within 2-3X of C) is really hard for extremely dynamic languages.
- pjmlp 3y agoHHVM help enough that HipHop compiler was thrown away, as the JIT produced better code, and it had the side effect, that nowadays the standard PHP also has a JIT. Shopify's JIT is showing good enough performance, that they are rewriting C code into Ruby. This is the thing of Python culture versus everyone else, rewriting in C is considered "Python".