gencode
gencode copied to clipboard
Question - why all the i+0 ?
One question - in the generated code I see many instances of i+0. I'm pretty sure that the compiler will optimize those out, but I'm curious why they are there.
@andyleap ^^
Fixed length fields are handled by incrementing the 0
portion, rather then having to increment the i
. The generator only emits the i
once it's been incremented, which means structs that are completely fixed size can be generated as nothing more then a series of byte operations, completely bypassing the need to mess with the index