std::pair<uint8_t, uint32_t> uses 8 bytes per transition, but we can reduce the memory usage of the DFA by about 3/8 by separating the characters from the destinations.
Created attachment 254013 [details] Patch
Comment on attachment 254013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254013&action=review > Source/WebCore/contentextensions/DFA.cpp:43 > + + transitionCharacters.size() * sizeof(uint8_t) > + + transitionDestinations.size() * sizeof(uint8_t) This should be capacity(), not size().
Comment on attachment 254013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254013&action=review >> Source/WebCore/contentextensions/DFA.cpp:43 >> + + transitionDestinations.size() * sizeof(uint8_t) > > This should be capacity(), not size(). And destinations are uint32_t.
http://trac.webkit.org/changeset/185078