Reviewed by Hyatt.
- force inlining of a template function that only has one call site per specialization
1.3% speedup on SunSpider
* kjs/collector.cpp:
(KJS::Collector::heapAllocate): This template function is only
called from allocate() and allocateNumber() (once per
specialization) and the extra call overhead for GC allocation
shows up, so force inlining.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34378
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-06-05 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Hyatt.
+
+ - force inlining of a template function that only has one call site per specialization
+ 1.3% speedup on SunSpider
+
+ * kjs/collector.cpp:
+ (KJS::Collector::heapAllocate): This template function is only
+ called from allocate() and allocateNumber() (once per
+ specialization) and the extra call overhead for GC allocation
+ shows up, so force inlining.
+
2008-06-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Alexey and Oliver.
typedef SmallCellCollectorBlock Block;
};
-template <Collector::HeapType heapType> void* Collector::heapAllocate(size_t s)
+template <Collector::HeapType heapType> ALWAYS_INLINE void* Collector::heapAllocate(size_t s)
{
typedef typename HeapConstants<heapType>::Block Block;
typedef typename HeapConstants<heapType>::Cell Cell;