liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

Optimize the parsers

Open mateofio opened this issue 7 years ago • 0 comments

I was thinking about how to optimize the parsing code. I had the following ideas for things to try.

  • [ ] Use a tuple based approach for Fields

The Field abstraction relies on iterating over heap allocated objects and virtual calls. Replace fields[] with a std::tuple<Field> for each Struct to optimize the memory layout and avoid the heap. Remove the virtual calls and iterate using templates instead.

  • [ ] Optimize field_map and tag_map

A hash table or sorted array would perform better than std::map

mateofio avatar Sep 30 '18 19:09 mateofio