generater more optimal code for crosstags for Diameter
Submitted by Kristof Szabados
Link to original bug (#568420)
Description
Crosstag as quite a complex structure, and require some heavy machinery during deciding to do it right. (in this case because of refering inside the structures to be decoded).
However in the case of Diameter, there is a special situation for which it might be possible to generate specially optimized code.
The important observation here is that in the case of diameter, the all of the crosstags are actually referring to a single field. If we could check that in all decodeable data structures, this field would fall onto the same location in the bytes to be decoded ... it would be possible to generate a code that jumps ahead to this location, decodes the field, jumps back and decodes the exact type that needs to be decoded. There would be no need for any guesswork and retries in the process.
This could make the decoding of large Diameter message maybe even 1,5 - 2 times faster.
Version: 7.1.0