lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Aug 20, 2008 at 10:55 AM, eugeny gladkih <> wrote:
>  JV> If your byte code has little endian ints, and your CPU want big endian
>  JV> ones, you have to convert every single int read from the bytecode.
>  JV> That hurts performance. And the bytecode loading is I/O bound on
>  JV> systems reading the data from disks, but on very memory constrained
>  JV> embedded environments (that benefit the most from bytecode format),
>  JV> the bytecode is likely to be read directly from a fast flash memory,
>  JV> so endianness conversion (and a fortiori float conversion) can hurt
>  JV> performance badly.
> reading the flash device is extremally slow comparing to CPU speed.

Getting rather offtopic, but... it depends.  It's not uncommon for
code to execute straight from flash on embedded devices, with no cache
to speak of.  They vary.  It can matter to avoid the extra code size
and runtime overhead of byte swapping.

-- James