The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)
Ned Batchelder
ned at nedbatchelder.com
Thu Mar 24 11:30:58 EDT 2016
On Thursday, March 24, 2016 at 9:51:11 AM UTC-4, Steven D'Aprano wrote:
> You know what is missing from this conversation?
>
> For one of Bart's critics to actually show faster code.
>
> There's plenty of people telling him off for writing unpythonic and slow
> code, but I haven't seen anyone actually demonstrating that Python is
> faster than his results show.
As I mentioned before, I'm happy to explain the fuller Python way to
write code, but I don't think Bart wants to learn it, because he is
focused on a different goal than, "write real Python code the best
possible way."
Here, for example, is a real lexer for JavaScript that I wrote:
https://bitbucket.org/ned/jslex/src
It makes heavy use of regexes to go fast. I don't have benchmarks
against other implementations unfortunately.
--Ned.
More information about the Python-list
mailing list