Use HashMaps for caching primitive values
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2011 18:53:22 +0000 (18:53 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2011 18:53:22 +0000 (18:53 +0000)
commit1b1ba5ff363ec78e83270b92b29e8b62300b3ae5
tree946b73ee41580ba98045da6118cae968341c75df
parent79df758b424a946587a5b0c925ae5d001f040371
Use HashMaps for caching primitive values
https://bugs.webkit.org/show_bug.cgi?id=55873

Reviewed by Sam Weinig.

Most documents use only small subset of cacheable primitive values. By replacing
fixed size cache arrays with HashMaps we can reduce the constant memory usage while also
expanding the range of cacheable values.

* css/CSSPrimitiveValueCache.cpp:
(WebCore::CSSPrimitiveValueCache::CSSPrimitiveValueCache):
(WebCore::CSSPrimitiveValueCache::createIdentifierValue):
(WebCore::CSSPrimitiveValueCache::createColorValue):
(WebCore::CSSPrimitiveValueCache::createValue):
* css/CSSPrimitiveValueCache.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueCache.cpp
Source/WebCore/css/CSSPrimitiveValueCache.h