Commit 6e61af6f authored by andersca@apple.com's avatar andersca@apple.com

Always use fastRealloc when growing or shrinking the Vector buffer

https://bugs.webkit.org/show_bug.cgi?id=99616

Reviewed by Andreas Kling.

Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
vector buffer when possible; realloc should always be at least as fast as free+malloc.

* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 159c476e
2012-10-17 Anders Carlsson <andersca@apple.com>
Always use fastRealloc when growing or shrinking the Vector buffer
https://bugs.webkit.org/show_bug.cgi?id=99616
Reviewed by Andreas Kling.
Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
vector buffer when possible; realloc should always be at least as fast as free+malloc.
* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):
2012-10-16 Michael Saboff <msaboff@apple.com> 2012-10-16 Michael Saboff <msaboff@apple.com>
Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
......
...@@ -278,14 +278,7 @@ namespace WTF { ...@@ -278,14 +278,7 @@ namespace WTF {
bool shouldReallocateBuffer(size_t newCapacity) const bool shouldReallocateBuffer(size_t newCapacity) const
{ {
#if PLATFORM(BLACKBERRY)
// Tested on BlackBerry.
return VectorTraits<T>::canMoveWithMemcpy && m_capacity && newCapacity; return VectorTraits<T>::canMoveWithMemcpy && m_capacity && newCapacity;
#else
// FIXME: Return true on the platforms where realloc() gives better performance.
UNUSED_PARAM(newCapacity);
return false;
#endif
} }
void reallocateBuffer(size_t newCapacity) void reallocateBuffer(size_t newCapacity)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment