Upgrade to Pro — share decks privately, control downloads, hide ads and more …

unordered_map Cleanup in writerfilter

unordered_map Cleanup in writerfilter

Lightning talk about how we got rid of (unnecessary) use of boost::unordered_map in the generated code in writerfilter in LibreOffice.

Jan Holesovsky

September 04, 2014

More Decks by Jan Holesovsky

Other Decks in Programming


  1. unordered_map Cleanup in writerfilter Jan Holesovsky <kendy@collabora.com> kendy, #libreoffice­dev, irc.freenode.net

  2. boost::unordered_map cleanup in writerfilter • Writerfilter uses lots of generated

    code for tokenizing • Model.xml, xslt before, now Python (thanks so much, Miklos!) • The output was ugly • Turned out there was a lot of unordered_map's there – initialized at runtime, etc. • Rewrote that all to switch/case's • Compile-time optimized now • Much smaller – 2M of library size cut of