by woodruffw · 4y ago · 0 comments
(It actually changes a whole lot, because there's a whole lot of code already out there written in Python. 25% faster is still 25% faster, even if the code would have been 100x faster to begin with in another language.)
And that's even assuming that the code would have existed at all in another language. The thing about interpreted GC languages is that the iterative loop of creation is much more agile, easier to start with and easier to prototype in than a compiled, strictly typed language.
Python is excessively dynamic, so it can't (conventionally) be sped up as easily as many other languages unfortunately. Finally some folks are being paid and allowed to be working on it.
It's about on par with Ruby, only Lua and JIT compiled runtimes beat it (for very understandable reasons).
def fooer(i: str, strings: list[str]):
push = str.append
for s in strings:
push(i, s)
Apparently this helps the interpreter understand that `append` is not getting overwritten in the global scope elsewhere.Common Lisp and Java begs to disagree.