4 ms·
Note that pyjs has several compilation options, one of which wraps numbers to distinguish between float and int. However, stuff like correct delegation with mul
by wkornewald 16y ago
Note that pyjs has several compilation options, one of which wraps numbers to distinguish between float and int. However, stuff like correct delegation with multiple inheritance might never work because js can only have one delegate. Currently one of the big problems in practice is that attribute access doesn't behave like getattr, which makes working with @property inconsistent. Also, __call__ doesn't work. Lots of minor details. At least they are checked in the unit tests, in case someone wants to help.
- Raphael_Amiard 16y agoHey, thanks for the precision, i didn't know you could box numbers in pyjs, i wonder how i missed that when i read the source. What is the typical performance hit from doing that ?
- wkornewald 16y agoI really don't remember the exact numbers, anymore. A few times slower. The slowdown certainly is significant enough for number-crunching code, but end-users wouldn't notice the difference for simple calculations. I haven't yet played with per-module compilation flags, but it would be possible to compile performance-critical modules with a higher optimization level. Such a solution might require a little wrapper to convert between the data types, depending on the chosen compilation options, but it's the same when talking to raw JS code.