ctf: Replace StructDeclaration map with an array
This will cause a 10% performance improvement while reading a trace
The LinkedHashMap of fields in a struct declaration is much slower
to iterate through than a regular array. This patch replaces the map
with an array. This yields a performance gain of approx 10%.
The patch also changes some methods behavior.
* getMaximumSize() clamps to Integer#MAX_VALUE instead of overflowing
* addField no longer overwrites a value already in the declaration.
As addField has been modified, extra attention has to be put on
the parser in the case of degenerate test cases to maintain the
current behavior.
Change-Id: Id76b3432b2c973a1e2cbecba5a9b22ad76a68162
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/66168
Reviewed-by: Hudson CI
This page took 0.024889 seconds and 5 git commands to generate.