On 24 August 2010 23:56, Albert Astals Cid <[email protected]> wrote: > A Dilluns, 23 d'agost de 2010, Paweł Wiejacha va escriure: > >> 04_fast_indexed_dict_lookup.patch >> Some PDFs contain large amounts (2000+) of Objects, e.g. publications >> with plots (grid, samples, lines, bands, axes, legend, scales). This >> results in 2000^2 strcmp() calls. >> Now if Dict contains > 10 objects, object-key index is built to reduce >> lookup time. > > Seems a good idea, but at the moment we have a policy of not using std:: so > that would make the patch rejected. Will have a look to see how much we really > win and if would make sense loosening that policy if the win is enough.
If indexing based on string name is a performance problem here it would be better to use a hash map. This would require modifying Dict to be a hash-based container, but should (a) be faster than a regular std::map and (b) avoid pulling in std:: (few compilers provide a hash-based container). - Reece _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
