Ignore:
Timestamp:
Mar 6, 2007, 6:27:35 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Maciej Stachowiak.


2% speedup on super accurate JS iBench.

(KJS::Collector::collect): Removed anti-optimization to call
pthread_is_threaded_np() before calling pthread_main_np(). Almost all
apps have more than one thread, so the extra call is actually worse.
Interestingly, even the single-threaded testkjs shows a speed gain
from removing the pthread_is_threaded_np() short-circuit. Not sure why.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r19209 r19994  
    494494 
    495495#if USE(MULTIPLE_THREADS)
    496     bool currentThreadIsMainThread = !pthread_is_threaded_np() || pthread_main_np();
     496    bool currentThreadIsMainThread = pthread_main_np();
    497497#else
    498498    bool currentThreadIsMainThread = true;
Note: See TracChangeset for help on using the changeset viewer.