3 ms·
An ATMega is sometimes a better choice because it's cheaper and uses less power, not because it has a better instruction format. An 8-bit bytecode would be ide
by comex 14y ago
An ATMega is sometimes a better choice because it's cheaper and uses less power, not because it has a better instruction format. An 8-bit bytecode would be ideal for very little on a 64-bit computer (you'd end up simulating larger integer arithmetic that the machine can do in a single instruction, for no benefit); more generally, since the details of the target machine are going to vary anyway, there is no point in having multiple bytecodes with the same underlying memory and execution model that can be easily complied between.
Having a C-like bytecode and a Java-like bytecode and a Haskell-like bytecode would be more reasonable, but it would also be a huge pain for browser makers. One highly optimized VM is complex enough...
- Lerc 14y agoHaving written assembly for x86, Arm, 8 bit AVR and indeed DCPU16, I disagree. Each performs particular functions better. More importantly, We should be able to disagree. You don't have to use my AVR-like bytecode and I don't have to use your Java-like bytecode. Having a single "this works for me so it should work for everyone" is dumb. Like only supporting png as your only image format.