[webkit-reviews] review granted: [Bug 55873] Use HashMaps for caching primitive values : [Attachment 84939] use HashMaps instead of fixed size arrays for caching
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 7 09:00:34 PST 2011
Sam Weinig <sam at webkit.org> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 55873: Use HashMaps for caching primitive values
https://bugs.webkit.org/show_bug.cgi?id=55873
Attachment 84939: use HashMaps instead of fixed size arrays for caching
https://bugs.webkit.org/attachment.cgi?id=84939&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=84939&action=review
> Source/WebCore/css/CSSPrimitiveValueCache.cpp:119
> + RefPtr<CSSPrimitiveValue> primitiveValue = cache->get(intValue);
> if (!primitiveValue) {
> primitiveValue = CSSPrimitiveValue::create(value, type);
> - m_integerValueCache[intValue][type] = primitiveValue;
> + cache->add(intValue, primitiveValue);
> }
Same comment as the the one mitz gave above. This can be done with one hash
lookup.
More information about the webkit-reviews
mailing list