15 ms·
Parrot's core opcodes mimic Perl's behavior of "Type coercion for everyone, the string "0" is false!" That's true only for the intrinsic STRING type. Language-
by chromatic 15y ago
Parrot's core opcodes mimic Perl's behavior of "Type coercion for everyone, the string "0" is false!"
That's true only for the intrinsic STRING type. Language-specific strings supply their own boolean semantics.
- adgar 15y agoBut then if the VM optimizes code paths related to STRING operations, languages can't take advantage of them as easily. There's a reason why the fastest VMs are deeply tied to the semantics of the language they support, LuaJIT being the best example.
- chromatic 15y agoYou're right about LuaJIT, but there's no reason the VM can't also optimize code paths related to high-level string operations.
- Nitramp 15y agoWell, at some point you might run out of space in the opcode byte (or multiple bytes), and then you need longer sequences that put up more cache pressure and require more time decoding, right? Also, the developers time budget and the VMs complexity migth keep you from optimizing all possible paths.