Message12338

Author zyasoft
Recipients sergei175, zyasoft
Date 2019-01-24.23:27:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548372466.32.0.816599390057.issue2738@roundup.psfhosted.org>
In-reply-to
Content
Yes, it is slow for this scenario, at x10 slower as seen here. Jython and CPython should currently be at about the same speed, since they have very close implementations. I did find it interesting that JRuby had very similar performance, which shows how challenging speeding dynamically typed languages is.

There is however one thing that makes things unnecessarily slow: because Jython 2.7 implements the Python 2.7 language, the code should be written to use xrange, not range, which will allocate a list containing 100 million consecutive integers. That's obviously unnecessary overhead.

It is also possible that we can still improve this speed with InvokeDynamic and related support, but that's a hard engineering challenge, even with the improvements in this support in JDK 12.
History
Date User Action Args
2019-01-24 23:27:46zyasoftsetmessageid: <1548372466.32.0.816599390057.issue2738@roundup.psfhosted.org>
2019-01-24 23:27:46zyasoftsetrecipients: + zyasoft, sergei175
2019-01-24 23:27:46zyasoftlinkissue2738 messages
2019-01-24 23:27:46zyasoftcreate