Bug 56913

Summary: Mapping booleans the same way as integers
Product: WebKit Reporter: Zoltan Herczeg <zherczeg>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, loki
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch barraclough: review+

Description Zoltan Herczeg 2011-03-23 03:54:58 PDT
There was a discussion about this in the SquirrelFish mailing list. In short, the booleans store their logical values in the payload part when using JSValue32_64 representation.

Performance:

TEST                   COMPARISON            FROM                 TO             DETAILS

=============================================================================

** TOTAL **:           1.007x as fast    501.7ms +/- 0.3%   498.3ms +/- 0.3%     significant

=============================================================================

  3d:                  ??                 68.7ms +/- 0.9%    68.9ms +/- 1.1%     not conclusive: might be *1.003x as slow*
    cube:              -                  21.5ms +/- 1.8%    21.5ms +/- 1.8%
    morph:             -                  21.9ms +/- 1.0%    21.8ms +/- 1.4%
    raytrace:          ??                 25.3ms +/- 1.4%    25.6ms +/- 2.4%     not conclusive: might be *1.012x as slow*

  access:              -                  59.5ms +/- 0.8%    59.5ms +/- 0.6%
    binary-trees:      -                   7.5ms +/- 6.7%     7.5ms +/- 5.0%
    fannkuch:          -                  24.0ms +/- 0.0%    24.0ms +/- 0.0%
    nbody:             -                  20.0ms +/- 0.0%    20.0ms +/- 0.0%
    nsieve:            -                   8.0ms +/- 0.0%     8.0ms +/- 0.0%

  bitops:              1.031x as fast     33.0ms +/- 0.0%    32.0ms +/- 0.0%     significant
    3bit-bits-in-byte: -                   6.0ms +/- 0.0%     6.0ms +/- 0.0%
    bits-in-byte:      1.111x as fast     10.0ms +/- 0.0%     9.0ms +/- 0.0%     significant
    bitwise-and:       -                   6.0ms +/- 0.0%     6.0ms +/- 0.0%
    nsieve-bits:       -                  11.0ms +/- 0.0%    11.0ms +/- 0.0%

  controlflow:         -                   4.0ms +/- 0.0%     4.0ms +/- 0.0%
    recursive:         -                   4.0ms +/- 0.0%     4.0ms +/- 0.0%

  crypto:              -                  31.1ms +/- 0.7%    31.0ms +/- 0.0%
    aes:               -                  19.1ms +/- 1.2%    19.0ms +/- 0.0%
    md5:               -                   7.0ms +/- 0.0%     7.0ms +/- 0.0%
    sha1:              -                   5.0ms +/- 0.0%     5.0ms +/- 0.0%

  date:                1.031x as fast     62.4ms +/- 1.0%    60.5ms +/- 1.1%     significant
    format-tofte:      1.040x as fast     31.4ms +/- 1.2%    30.2ms +/- 1.5%     significant
    format-xparb:      1.023x as fast     31.0ms +/- 1.5%    30.3ms +/- 1.6%     significant

  math:                -                  51.6ms +/- 0.7%    51.2ms +/- 0.6%
    cordic:            -                  16.0ms +/- 0.0%    16.0ms +/- 0.0%
    partial-sums:      -                  23.1ms +/- 1.0%    23.0ms +/- 0.0%
    spectral-norm:     -                  12.5ms +/- 3.0%    12.2ms +/- 2.5%

  regexp:              1.023x as fast     22.0ms +/- 0.0%    21.5ms +/- 1.8%     significant
    dna:               1.023x as fast     22.0ms +/- 0.0%    21.5ms +/- 1.8%     significant

  string:              ??                169.4ms +/- 0.4%   169.7ms +/- 0.4%     not conclusive: might be *1.002x as slow*
    base64:            ??                 17.0ms +/- 0.0%    17.1ms +/- 1.3%     not conclusive: might be *1.006x as slow*
    fasta:             -                  24.0ms +/- 0.0%    23.7ms +/- 1.5%
    tagcloud:          -                  40.6ms +/- 1.2%    40.2ms +/- 0.7%
    unpack-code:       *1.017x as slow*   65.0ms +/- 0.0%    66.1ms +/- 0.6%     significant
    validate-input:    -                  22.8ms +/- 1.3%    22.6ms +/- 1.6%
Comment 1 Zoltan Herczeg 2011-03-23 03:59:58 PDT
Created attachment 86600 [details]
patch
Comment 2 Zoltan Herczeg 2011-03-23 04:19:37 PDT
TEST              COMPARISON            FROM                 TO             DETAILS

=============================================================================

** TOTAL **:      1.016x as fast    3496.6ms +/- 1.3%   3442.0ms +/- 0.7%     significant

=============================================================================

  v8:             1.016x as fast    3496.6ms +/- 1.3%   3442.0ms +/- 0.7%     significant
    crypto:       -                  391.4ms +/- 0.2%    391.7ms +/- 0.1%
    deltablue:    1.013x as fast     651.1ms +/- 0.7%    642.8ms +/- 0.6%     significant
    earley-boyer: 1.045x as fast     563.4ms +/- 1.7%    539.0ms +/- 1.8%     significant
    raytrace:     -                  204.3ms +/- 17.1%    192.0ms +/- 14.2%
    regexp:       ??                 355.2ms +/- 0.5%    355.8ms +/- 0.7%     not conclusive: might be *1.002x as slow*
    richards:     1.017x as fast     635.9ms +/- 0.5%    625.1ms +/- 0.5%     significant
    splay:        -                  695.3ms +/- 0.4%    695.6ms +/- 0.4%
Comment 3 Zoltan Herczeg 2011-03-23 04:23:34 PDT
(measured on an AMD x86-32 system)
Comment 4 Gavin Barraclough 2011-04-07 16:49:29 PDT
Hey Zoltan, looks great, tidy little perf win!, very nice.  Fits nicely with my change for JSVALUE64 (no noticeable improvement there, but good to remove the pointless shift).  Hope you don't mind, took the liberty to land this because I wanted the documentation of the immediate formats up to date, fixed in r83230.