• Z Nguyen-Huu's avatar
    Use type feedback to improve exponentiation. · ae95f46d
    Z Nguyen-Huu authored
    With this change, we use Float64Pow for both Smi and Float inputs, also
    introduce new speculative operator.
    
    For this PoC
    ==========================================================
    let result = [NaN]; // Avoid HeapNumber-boxing the results.
    
    function slow(){
      for(let i = 0; i < 100000000; i++) {
        result[0] = i ** 2;
      }
    }
    
    start = Date.now();
    slow();
    console.log(Date.now() - start);
    ==========================================================
    Before: 1313
    After: 112
    
    Bug: v8:11731
    Change-Id: I07a1bde068bef8184b9f556be9d1fe2d6a288705
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960064
    Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#75590}
    ae95f46d
Name
Last commit
Last update
..
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
accessor-assembler.cc Loading commit data...
accessor-assembler.h Loading commit data...
binary-op-assembler.cc Loading commit data...
binary-op-assembler.h Loading commit data...
call-optimization.cc Loading commit data...
call-optimization.h Loading commit data...
handler-configuration-inl.h Loading commit data...
handler-configuration.cc Loading commit data...
handler-configuration.h Loading commit data...
handler-configuration.tq Loading commit data...
ic-inl.h Loading commit data...
ic-stats.cc Loading commit data...
ic-stats.h Loading commit data...
ic.cc Loading commit data...
ic.h Loading commit data...
keyed-store-generic.cc Loading commit data...
keyed-store-generic.h Loading commit data...
stub-cache.cc Loading commit data...
stub-cache.h Loading commit data...
unary-op-assembler.cc Loading commit data...
unary-op-assembler.h Loading commit data...