Message12338
 
            
            
            
 
   
   
 
  | 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. |  |
 
| Date | User | Action | Args |  | 2019-01-24 23:27:46 | zyasoft | set | messageid: <1548372466.32.0.816599390057.issue2738@roundup.psfhosted.org> |  | 2019-01-24 23:27:46 | zyasoft | set | recipients:
  + zyasoft, sergei175 |  | 2019-01-24 23:27:46 | zyasoft | link | issue2738 messages |  | 2019-01-24 23:27:46 | zyasoft | create |  | 
 |