GenericSalLayout: manage the collection of GlyphItem with a vector.
There was a TODO to replace a manually managed array of Glyphs to use std::list a GlyphItem is 36 bytes long. the colleciton of GlyphItems is mostly used in a sequential access. random insert/delete are fairly rare. using std::list would increase the size by at least 8 to 16 bytes per element (depending on the size of void*) (25 to 50% overhead) and would greatly degrade data locality for most iterations loops. so std::vector seems more appropriate here.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment