Bug 134567

Summary: [ftlopt] Infer immutable object properties
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 134641, 134962    
Attachments:
Description Flags
it begins
none
more!!
none
getting further
none
closer to done
none
it just folded some constants
none
it's really starting to be awesome
none
and now, more sound than ever!
none
almost done
none
adding more ruggedness
none
the patch
none
the patch
none
the patch mhahnenberg: review+

Description Filip Pizlo 2014-07-02 15:34:06 PDT
We already do something like this for properties that point to functions, but the way that we do it leads to structure explosion.  We should do it for all properties and we should do it in a way that doesn't explode the number of structures.  Patch forthcoming.
Comment 1 Filip Pizlo 2014-07-02 15:34:59 PDT
Created attachment 234289 [details]
it begins
Comment 2 Filip Pizlo 2014-07-02 20:06:33 PDT
Created attachment 234309 [details]
more!!
Comment 3 Filip Pizlo 2014-07-02 20:43:11 PDT
Created attachment 234313 [details]
getting further
Comment 4 Filip Pizlo 2014-07-02 21:44:43 PDT
Created attachment 234315 [details]
closer to done
Comment 5 Filip Pizlo 2014-07-02 21:50:37 PDT
Created attachment 234316 [details]
it just folded some constants

Freaking amazing.
Comment 6 Filip Pizlo 2014-07-03 16:36:45 PDT
Created attachment 234379 [details]
it's really starting to be awesome

I just confirmed that it folds the Math global property as well as all of the Math object's properties.  So, Math.PI is now folded.

I also confirmed that this will jettison code correctly upon various kinds of replaces.
Comment 7 Filip Pizlo 2014-07-03 20:18:46 PDT
Created attachment 234388 [details]
and now, more sound than ever!
Comment 8 Filip Pizlo 2014-07-03 23:05:45 PDT
This is almost ready, except that it appears that I broke fast ToString for StringObjects.  Should be easy to fix.
Comment 9 Filip Pizlo 2014-07-04 12:44:21 PDT
Nice!  In its latest incarnation this is pretty much pure awesomeness.


Benchmark report for SunSpider, LongSpider, V8Spider, Octane, Kraken, JSRegress, and AsmBench on oldmac (MacPro4,1).

VMs tested:
"TipOfTree" at /Volumes/Data/pizlo/ftlopt/OpenSource/WebKitBuild/Release/jsc (r170785)
"ConstantProps" at /Volumes/Data/fromMiniMe/secondary/OpenSource/WebKitBuild/Release/jsc (r170785)

Collected 6 samples per benchmark/VM, with 6 VM invocations per benchmark. Emitted a call to gc() between sample measurements.
Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime() function to get microsecond-level
timing. Reporting benchmark execution times with 95% confidence intervals in milliseconds.

                                                        TipOfTree               ConstantProps                                   
SunSpider:
   3d-cube                                            7.8182+-0.1444     ?      7.8580+-0.0973        ?
   3d-morph                                           9.2818+-0.0742     ?      9.4355+-0.1044        ? might be 1.0166x slower
   3d-raytrace                                        9.8968+-0.2137            9.8267+-0.1644        
   access-binary-trees                                2.8699+-0.0848            2.8403+-0.0732          might be 1.0104x faster
   access-fannkuch                                    9.1933+-0.1137     ?      9.3389+-0.1167        ? might be 1.0158x slower
   access-nbody                                       4.6412+-0.0057            4.6166+-0.0197        
   access-nsieve                                      5.8329+-0.0859            5.7286+-0.0387          might be 1.0182x faster
   bitops-3bit-bits-in-byte                           1.8864+-0.0141     ^      1.8498+-0.0157        ^ definitely 1.0198x faster
   bitops-bits-in-byte                                6.4659+-0.0613     ?      6.4905+-0.1861        ?
   bitops-bitwise-and                                 3.1133+-0.0408     !      3.1747+-0.0173        ! definitely 1.0197x slower
   bitops-nsieve-bits                                 5.6344+-0.0613     ?      5.6586+-0.0174        ?
   controlflow-recursive                              3.0105+-0.0997            2.9262+-0.0598          might be 1.0288x faster
   crypto-aes                                         6.2664+-0.0253            6.1605+-0.0987          might be 1.0172x faster
   crypto-md5                                         3.4561+-0.0797            3.3875+-0.0722          might be 1.0203x faster
   crypto-sha1                                        3.7590+-0.0745            3.6788+-0.1160          might be 1.0218x faster
   date-format-tofte                                 13.3283+-0.3421     ?     13.8675+-0.2277        ? might be 1.0405x slower
   date-format-xparb                                  9.9023+-0.1651     ^      9.2990+-0.1573        ^ definitely 1.0649x faster
   math-cordic                                        4.6479+-0.0227     ?      4.6805+-0.0450        ?
   math-partial-sums                                 10.4815+-0.1197           10.4422+-0.0698        
   math-spectral-norm                                 3.0301+-0.0269     ?      3.0328+-0.0606        ?
   regexp-dna                                        11.9474+-0.1070           11.9155+-0.0475        
   string-base64                                      6.3040+-0.0687     ?      6.3441+-0.0548        ?
   string-fasta                                      10.2974+-0.1975     ^      9.8374+-0.2411        ^ definitely 1.0468x faster
   string-tagcloud                                   15.7889+-0.2443           15.7231+-0.1629        
   string-unpack-code                                32.4867+-0.0957     ?     32.6636+-0.3014        ?
   string-validate-input                              7.6651+-0.1167            7.5939+-0.0989        

   <arithmetic> *                                     8.0387+-0.0243            8.0143+-0.0208          might be 1.0030x faster
   <geometric>                                        6.5385+-0.0154     ^      6.5005+-0.0171        ^ definitely 1.0059x faster
   <harmonic>                                         5.4245+-0.0191     ^      5.3811+-0.0147        ^ definitely 1.0081x faster

                                                        TipOfTree               ConstantProps                                   
LongSpider:
   3d-cube                                         1396.8603+-10.3192        1371.5168+-15.3227         might be 1.0185x faster
   3d-morph                                        2285.6272+-13.6408    ?   2300.9314+-40.5206       ?
   3d-raytrace                                     1453.4378+-16.7932    ^   1353.9293+-9.5723        ^ definitely 1.0735x faster
   access-binary-trees                             1675.6227+-7.9567     ?   1684.0506+-2.8048        ?
   access-fannkuch                                  535.1838+-13.4817         525.7400+-19.9542         might be 1.0180x faster
   access-nbody                                    1257.1671+-2.9269     ^   1253.2397+-0.7783        ^ definitely 1.0031x faster
   access-nsieve                                   1620.8115+-38.4795        1599.5381+-5.0212          might be 1.0133x faster
   bitops-3bit-bits-in-byte                          56.9978+-1.8287           56.4445+-0.2942        
   bitops-bits-in-byte                              396.6784+-7.1251          396.2156+-2.5079        
   bitops-nsieve-bits                              1176.4320+-3.6247     ?   1177.0687+-4.7187        ?
   controlflow-recursive                            878.2308+-1.5768     ?    878.4530+-1.6065        ?
   crypto-aes                                      1160.5512+-11.3042        1149.3007+-3.1883        
   crypto-md5                                      1086.2631+-2.7155     ?   1090.1393+-3.2695        ?
   crypto-sha1                                     1211.2503+-3.8371     ?   1214.3267+-8.8184        ?
   date-format-tofte                               1211.1415+-23.7684    ?   1243.5400+-19.2116       ? might be 1.0268x slower
   date-format-xparb                               1651.9672+-24.7190    ^   1474.4400+-20.8955       ^ definitely 1.1204x faster
   math-cordic                                     1020.4646+-8.6662         1011.9027+-5.1625        
   math-partial-sums                               1317.2390+-2.3525     ?   1320.3023+-6.5964        ?
   math-spectral-norm                              1295.7792+-1.0312     ?   1296.3031+-1.4140        ?
   string-base64                                    598.8907+-4.4233     ?    601.1595+-4.4636        ?
   string-fasta                                     900.2269+-12.6027         882.9235+-6.6057          might be 1.0196x faster
   string-tagcloud                                  394.9052+-3.3092     ?    400.6811+-3.5039        ? might be 1.0146x slower

   <arithmetic>                                    1117.3513+-3.2822     ^   1103.7339+-2.3040        ^ definitely 1.0123x faster
   <geometric> *                                    934.2760+-3.4646     ^    925.0132+-1.9553        ^ definitely 1.0100x faster
   <harmonic>                                       554.9211+-8.2112          550.6189+-1.2271          might be 1.0078x faster

                                                        TipOfTree               ConstantProps                                   
V8Spider:
   crypto                                            82.7073+-1.1513     ?     83.3436+-1.2322        ?
   deltablue                                        100.3507+-0.4808          100.3495+-0.4562        
   earley-boyer                                      74.4385+-0.5887           73.3586+-0.6209          might be 1.0147x faster
   raytrace                                          43.5021+-0.7988           43.3727+-0.7127        
   regexp                                           105.4128+-1.4601          105.2356+-0.6738        
   richards                                         108.3555+-1.0664     ?    109.3989+-1.4256        ?
   splay                                             49.8586+-0.4919     ?     50.5465+-0.9555        ? might be 1.0138x slower

   <arithmetic>                                      80.6608+-0.1446     ?     80.8008+-0.4591        ? might be 1.0017x slower
   <geometric> *                                     76.4765+-0.0996     ?     76.6045+-0.4907        ? might be 1.0017x slower
   <harmonic>                                        71.9717+-0.2036     ?     72.0993+-0.5688        ? might be 1.0018x slower

                                                        TipOfTree               ConstantProps                                   
Octane and V8v7:
   encrypt                                           0.41965+-0.00140          0.41926+-0.00053       
   decrypt                                           7.57283+-0.02756          7.57253+-0.01631       
   deltablue                                x2       0.46821+-0.00252    ^     0.45882+-0.00471       ^ definitely 1.0205x faster
   earley                                            0.94636+-0.00590          0.94614+-0.00545       
   boyer                                            10.62972+-0.12452         10.48411+-0.08605         might be 1.0139x faster
   navier-stokes                            x2       7.69744+-0.00734    !     7.71627+-0.01002       ! definitely 1.0024x slower
   raytrace                                 x2       2.91817+-0.03264    ^     2.73621+-0.03914       ^ definitely 1.0665x faster
   regexp                                   x2      32.78528+-0.15415    ?    33.17915+-0.24116       ? might be 1.0120x slower
   richards                                 x2       0.23349+-0.00454          0.23331+-0.00811       
   splay                                    x2       0.63048+-0.00701    !     0.64120+-0.00320       ! definitely 1.0170x slower
   pdfjs                                    x2      94.51867+-0.98388    ^    92.80384+-0.46530       ^ definitely 1.0185x faster
   mandreel                                 x2      88.00037+-0.41322    ?    88.26669+-0.73920       ?
   gbemu                                    x2      68.86337+-0.48167         68.62590+-0.27462       
   closure                                           0.88070+-0.00113    !     0.89743+-0.00195       ! definitely 1.0190x slower
   jquery                                           10.92016+-0.06929    ?    10.94888+-0.03767       ?
   box2d                                    x2      25.50091+-0.08468    ^    25.14991+-0.18822       ^ definitely 1.0140x faster
   zlib                                     x2     772.87741+-3.04224        755.45981+-34.31395        might be 1.0231x faster
   typescript                               x2    1238.48336+-8.61351    !  1256.15560+-7.76545       ! definitely 1.0143x slower

V8v7:
   <arithmetic>                                      6.81467+-0.01928    ?     6.83450+-0.02790       ? might be 1.0029x slower
   <geometric> *                                     2.02871+-0.00434    ^     2.01306+-0.01054       ^ definitely 1.0078x faster
   <harmonic>                                        0.77356+-0.00552          0.77015+-0.01170         might be 1.0044x faster

Octane including V8v7:
   <arithmetic>                                    156.57746+-0.51277        156.47072+-2.41841         might be 1.0007x faster
   <geometric> *                                    11.83003+-0.01569    ^    11.75676+-0.05640       ^ definitely 1.0062x faster
   <harmonic>                                        1.35954+-0.00915          1.35513+-0.01925         might be 1.0033x faster

                                                        TipOfTree               ConstantProps                                   
Kraken:
   ai-astar                                          530.397+-2.435            529.899+-1.558         
   audio-beat-detection                              203.172+-2.706      ?     208.286+-3.927         ? might be 1.0252x slower
   audio-dft                                         255.009+-1.040            252.838+-3.750         
   audio-fft                                         116.580+-0.219      !     121.425+-0.276         ! definitely 1.0416x slower
   audio-oscillator                                  366.890+-1.210      ^     357.903+-1.062         ^ definitely 1.0251x faster
   imaging-darkroom                                  293.948+-1.000      ^     288.127+-1.866         ^ definitely 1.0202x faster
   imaging-desaturate                                121.926+-0.196      ?     122.075+-0.703         ?
   imaging-gaussian-blur                             184.259+-7.894            178.107+-0.463           might be 1.0345x faster
   json-parse-financial                               83.101+-0.438      !      85.437+-0.721         ! definitely 1.0281x slower
   json-stringify-tinderbox                          102.693+-1.620      ?     102.739+-0.802         ?
   stanford-crypto-aes                                92.870+-1.287      ?      93.139+-1.223         ?
   stanford-crypto-ccm                                93.173+-11.055            88.698+-9.171           might be 1.0504x faster
   stanford-crypto-pbkdf2                            247.719+-3.138      ?     253.236+-5.527         ? might be 1.0223x slower
   stanford-crypto-sha256-iterative                  108.154+-0.270      !     109.881+-0.562         ! definitely 1.0160x slower

   <arithmetic> *                                    199.992+-1.160            199.414+-0.458           might be 1.0029x faster
   <geometric>                                       168.815+-1.713            168.813+-1.026           might be 1.0000x faster
   <harmonic>                                        146.243+-2.158      ?     146.548+-1.591         ? might be 1.0021x slower

                                                        TipOfTree               ConstantProps                                   
JSRegress:
   adapt-to-double-divide                            20.1566+-0.4820     ?     20.4130+-0.4260        ? might be 1.0127x slower
   aliased-arguments-getbyval                         1.1097+-0.0054            1.1029+-0.0142        
   allocate-big-object                                3.6436+-0.0398            3.5542+-0.1467          might be 1.0252x faster
   arity-mismatch-inlining                            1.0027+-0.0051            0.9973+-0.0093        
   array-access-polymorphic-structure                10.8465+-0.1660           10.6795+-0.2787          might be 1.0156x faster
   array-nonarray-polymorhpic-access                 62.7782+-0.1760           61.6053+-1.6442          might be 1.0190x faster
   array-prototype-every                            119.3313+-0.6267     ?    120.1406+-1.4944        ?
   array-prototype-forEach                          120.4464+-1.7173          120.1052+-1.6394        
   array-prototype-map                              145.6106+-3.1862          145.2546+-1.5498        
   array-prototype-some                             119.3205+-1.4262     ?    120.3271+-1.5373        ?
   array-splice-contiguous                           68.7826+-0.6802           68.2888+-0.3305        
   array-with-double-add                              6.6840+-0.0760     ?      6.7539+-0.0843        ? might be 1.0105x slower
   array-with-double-increment                        4.6770+-0.0688     ?      4.7239+-0.0797        ? might be 1.0100x slower
   array-with-double-mul-add                          7.7596+-0.1019     ?      7.7671+-0.1856        ?
   array-with-double-sum                              5.0004+-0.0598     ?      5.0239+-0.0535        ?
   array-with-int32-add-sub                          12.1359+-0.2474           11.9742+-0.3553          might be 1.0135x faster
   array-with-int32-or-double-sum                     5.1298+-0.0863     ?      5.1679+-0.0907        ?
   ArrayBuffer-DataView-alloc-large-long-lived   
                                                    115.6589+-1.0129     ?    116.5123+-1.8083        ?
   ArrayBuffer-DataView-alloc-long-lived             32.8177+-0.5638     ?     33.1582+-1.0669        ? might be 1.0104x slower
   ArrayBuffer-Int32Array-byteOffset                  5.2358+-0.0219     ?      5.2576+-0.0857        ?
   ArrayBuffer-Int8Array-alloc-large-long-lived   
                                                    119.4163+-1.8239     ?    119.9810+-1.5387        ?
   ArrayBuffer-Int8Array-alloc-long-lived-buffer   
                                                     51.9901+-0.5785           51.2875+-0.6402          might be 1.0137x faster
   ArrayBuffer-Int8Array-alloc-long-lived            31.6105+-0.7069     ?     31.9215+-0.4813        ?
   ArrayBuffer-Int8Array-alloc                       27.6875+-0.1539     ?     28.2430+-1.1793        ? might be 1.0201x slower
   asmjs_bool_bug                                    10.1601+-0.0612     ?     10.2467+-0.2046        ?
   assign-custom-setter-polymorphic                   4.7867+-0.1316     ?      4.9858+-0.1300        ? might be 1.0416x slower
   assign-custom-setter                               6.7165+-0.1137            6.6605+-0.0503        
   basic-set                                         16.4006+-0.3347           16.2670+-0.2332        
   big-int-mul                                        6.2640+-0.0835            6.2002+-0.0529          might be 1.0103x faster
   boolean-test                                       4.7208+-0.0527            4.7201+-0.0539        
   branch-fold                                        5.2437+-0.0702            5.2140+-0.0427        
   by-val-generic                                    14.1660+-0.1892           13.5597+-0.4247          might be 1.0447x faster
   call-spread-apply                                 20.9012+-0.2553     ^     20.3403+-0.2109        ^ definitely 1.0276x faster
   call-spread-call                                   9.8323+-0.5154     ^      8.8636+-0.2445        ^ definitely 1.1093x faster
   captured-assignments                               0.5573+-0.0021     ^      0.5390+-0.0040        ^ definitely 1.0338x faster
   cast-int-to-double                                12.7326+-0.0758     ^      9.3109+-0.0823        ^ definitely 1.3675x faster
   cell-argument                                     10.7828+-0.1910     !     11.1706+-0.0585        ! definitely 1.0360x slower
   cfg-simplify                                       4.1611+-0.0498            4.1231+-0.0252        
   chain-getter-access                               14.7625+-0.3700           14.5063+-0.6848          might be 1.0177x faster
   cmpeq-obj-to-obj-other                            13.8355+-0.4028           13.6326+-0.2336          might be 1.0149x faster
   constant-test                                      8.7774+-0.1035            8.6570+-0.1330          might be 1.0139x faster
   DataView-custom-properties                       123.9673+-1.4988     ?    126.2419+-2.3620        ? might be 1.0183x slower
   delay-tear-off-arguments-strictmode                3.6824+-0.0634            3.6037+-0.0156          might be 1.0218x faster
   destructuring-arguments                            8.8627+-0.0889            8.7476+-0.0360          might be 1.0132x faster
   destructuring-swap                                 8.9816+-0.0888     ?      9.2612+-0.6567        ? might be 1.0311x slower
   direct-arguments-getbyval                          1.1214+-0.0131            1.1122+-0.0086        
   double-get-by-val-out-of-bounds                    6.7161+-0.3593            6.6451+-0.1072          might be 1.0107x faster
   double-pollution-getbyval                         11.5153+-0.1688           11.2941+-0.0966          might be 1.0196x faster
   double-pollution-putbyoffset                       6.1663+-0.0950     ?      6.2904+-0.1064        ? might be 1.0201x slower
   double-to-int32-typed-array-no-inline              3.0663+-0.0652     ?      3.1301+-0.0683        ? might be 1.0208x slower
   double-to-int32-typed-array                        2.4859+-0.0637            2.4489+-0.0676          might be 1.0151x faster
   double-to-uint32-typed-array-no-inline             3.1399+-0.0814            3.1054+-0.0494          might be 1.0111x faster
   double-to-uint32-typed-array                       2.5830+-0.0083     ?      2.6283+-0.0659        ? might be 1.0175x slower
   empty-string-plus-int                             10.6350+-0.2081           10.6099+-0.1102        
   emscripten-cube2hash                              53.7954+-0.6525     ?     54.0302+-0.5414        ?
   external-arguments-getbyval                        2.0347+-0.0186     ?      2.0659+-0.0237        ? might be 1.0153x slower
   external-arguments-putbyval                        2.9494+-0.0577            2.9487+-0.0239        
   fixed-typed-array-storage-var-index                1.5306+-0.0184     ?      1.5513+-0.1044        ? might be 1.0135x slower
   fixed-typed-array-storage                          1.0946+-0.0070     ?      1.1001+-0.0052        ?
   Float32Array-matrix-mult                           7.9947+-0.2757     ^      7.3328+-0.0493        ^ definitely 1.0903x faster
   Float32Array-to-Float64Array-set                  90.5518+-0.7002     ^     86.8063+-1.4259        ^ definitely 1.0431x faster
   Float64Array-alloc-long-lived                    100.5495+-0.7951     ?    101.7828+-1.6483        ? might be 1.0123x slower
   Float64Array-to-Int16Array-set                   113.5450+-1.5516     ?    114.8343+-1.1904        ? might be 1.0114x slower
   fold-double-to-int                                20.0441+-0.0878     ^     19.4780+-0.1484        ^ definitely 1.0291x faster
   fold-get-by-id-to-multi-get-by-offset-rare-int   
                                                     19.5690+-0.2473     ?     19.6657+-0.3255        ?
   fold-get-by-id-to-multi-get-by-offset             18.5912+-0.4329           18.5812+-0.4157        
   fold-multi-get-by-offset-to-get-by-offset   
                                                     13.0438+-0.1680     ?     13.0720+-0.1333        ?
   fold-multi-get-by-offset-to-poly-get-by-offset   
                                                     13.3062+-0.3461     ?     13.5207+-0.2814        ? might be 1.0161x slower
   fold-multi-put-by-offset-to-poly-put-by-offset   
                                                     13.3691+-0.2164     ?     13.6096+-0.6598        ? might be 1.0180x slower
   fold-multi-put-by-offset-to-put-by-offset   
                                                     12.5774+-0.3965     ?     12.6602+-0.2009        ?
   fold-multi-put-by-offset-to-replace-or-transition-put-by-offset   
                                                     17.0962+-0.1886     ?     17.9964+-0.7243        ? might be 1.0527x slower
   fold-put-by-id-to-multi-put-by-offset             20.9953+-0.4624     ?     21.1296+-0.2602        ?
   fold-put-structure                                12.9547+-0.8590           12.6846+-0.1583          might be 1.0213x faster
   for-of-iterate-array-entries                       9.7149+-0.2017            9.6415+-0.3371        
   for-of-iterate-array-keys                          3.6069+-0.0551     ?      3.6301+-0.0802        ?
   for-of-iterate-array-values                        3.1514+-0.0504     ?      3.2241+-0.0714        ? might be 1.0231x slower
   fround                                            24.6322+-0.5920           23.9149+-0.2507          might be 1.0300x faster
   ftl-library-inlining-dataview                    108.7813+-0.2004     ?    108.9919+-0.6329        ?
   ftl-library-inlining                              85.3251+-0.9073     ^     78.4889+-0.2815        ^ definitely 1.0871x faster
   function-dot-apply                                 1.7515+-0.1522     ?      1.7684+-0.1173        ?
   function-test                                      5.1385+-0.0659     ?      5.2560+-0.1294        ? might be 1.0229x slower
   function-with-eval                                41.2917+-1.9227     ?     41.5510+-1.4997        ?
   get-by-id-bimorphic-check-structure-elimination-simple   
                                                      3.8440+-0.1143            3.7693+-0.0197          might be 1.0198x faster
   get-by-id-bimorphic-check-structure-elimination   
                                                      9.5938+-0.2248            9.4759+-0.2065          might be 1.0124x faster
   get-by-id-chain-from-try-block                     8.2907+-0.1710            8.1578+-0.1502          might be 1.0163x faster
   get-by-id-check-structure-elimination              8.7229+-0.2775     ?      8.8422+-0.1921        ? might be 1.0137x slower
   get-by-id-proto-or-self                           26.5906+-0.9641     ^     24.0653+-0.4974        ^ definitely 1.1049x faster
   get-by-id-quadmorphic-check-structure-elimination-simple   
                                                      4.5827+-0.1334            4.5074+-0.0625          might be 1.0167x faster
   get-by-id-self-or-proto                           25.2640+-1.6747           25.2100+-1.2282        
   get-by-val-out-of-bounds                           6.5247+-0.1308     ?      6.7217+-0.1034        ? might be 1.0302x slower
   get_callee_monomorphic                             5.2276+-0.1041     ?      5.2322+-0.0691        ?
   get_callee_polymorphic                             4.8301+-0.1091     ?      4.9362+-0.2313        ? might be 1.0220x slower
   getter-no-activation                               6.7260+-0.0730     ?      6.7400+-0.0873        ?
   getter-richards                                  188.7612+-3.3148     ^    180.4673+-2.1352        ^ definitely 1.0460x faster
   getter                                             7.4904+-0.0544     ?      7.5024+-0.1343        ?
   global-var-const-infer-fire-from-opt               1.2407+-0.0262            1.2207+-0.0329          might be 1.0164x faster
   global-var-const-infer                             1.0425+-0.0262            1.0060+-0.0118          might be 1.0362x faster
   HashMap-put-get-iterate-keys                      40.1039+-0.7255     ?     40.1191+-0.8245        ?
   HashMap-put-get-iterate                           39.4474+-0.2804     !     40.3617+-0.6201        ! definitely 1.0232x slower
   HashMap-string-put-get-iterate                    45.0497+-0.9877     ?     45.3664+-0.6770        ?
   hoist-make-rope                                   13.7999+-1.0012     ?     15.0317+-1.8596        ? might be 1.0893x slower
   hoist-poly-check-structure-effectful-loop   
                                                      7.9592+-0.1957     ^      7.5464+-0.0559        ^ definitely 1.0547x faster
   hoist-poly-check-structure                         5.6182+-0.0888     ?      5.6205+-0.0780        ?
   imul-double-only                                  10.3164+-0.5316           10.0855+-0.0559          might be 1.0229x faster
   imul-int-only                                     13.9302+-0.2313           13.4403+-0.5403          might be 1.0364x faster
   imul-mixed                                        10.7068+-0.6344            9.9153+-0.5662          might be 1.0798x faster
   in-four-cases                                     28.4354+-0.1606           28.2911+-0.2399        
   in-one-case-false                                 14.8007+-0.0816           14.7165+-0.1417        
   in-one-case-true                                  14.7682+-0.1952     ?     14.8349+-0.0629        ?
   in-two-cases                                      15.3875+-0.1451           15.3042+-0.1745        
   indexed-properties-in-objects                      4.4513+-0.1878            4.2585+-0.0796          might be 1.0453x faster
   infer-closure-const-then-mov-no-inline             5.1235+-0.0255     ?      5.1474+-0.0787        ?
   infer-closure-const-then-mov                      29.0813+-0.0797     ?     29.1599+-0.1559        ?
   infer-closure-const-then-put-to-scope-no-inline   
                                                     17.5041+-0.0853     ?     17.5347+-0.0290        ?
   infer-closure-const-then-put-to-scope             33.1790+-0.0900     ?     33.2420+-0.1520        ?
   infer-closure-const-then-reenter-no-inline   
                                                     77.0221+-0.1399     ?     77.1581+-0.1688        ?
   infer-closure-const-then-reenter                  33.1546+-0.0716           33.1429+-0.0489        
   infer-one-time-closure-ten-vars                   16.4497+-0.1416     ?     16.5612+-0.5818        ?
   infer-one-time-closure-two-vars                   15.6585+-0.2200     ?     15.8984+-0.0784        ? might be 1.0153x slower
   infer-one-time-closure                            15.6790+-0.0862           15.6455+-0.0948        
   infer-one-time-deep-closure                       28.4882+-0.6090           28.2891+-0.1844        
   inline-arguments-access                            1.5903+-0.0151     ^      1.5314+-0.0055        ^ definitely 1.0384x faster
   inline-arguments-aliased-access                    1.7028+-0.0675            1.6509+-0.0114          might be 1.0314x faster
   inline-arguments-local-escape                     19.5387+-0.2849     !     21.2420+-0.3113        ! definitely 1.0872x slower
   inline-get-scoped-var                              7.0592+-0.1785            7.0026+-0.0594        
   inlined-put-by-id-transition                      15.5213+-0.5594           15.5015+-0.2844        
   int-or-other-abs-then-get-by-val                   9.7403+-0.2702     ^      8.0863+-0.1441        ^ definitely 1.2045x faster
   int-or-other-abs-zero-then-get-by-val             33.4406+-0.4242     ^     30.0487+-0.4637        ^ definitely 1.1129x faster
   int-or-other-add-then-get-by-val                  10.7246+-0.1277     ^      6.7496+-0.0353        ^ definitely 1.5889x faster
   int-or-other-add                                  11.0798+-0.1256     ^      8.9613+-0.1203        ^ definitely 1.2364x faster
   int-or-other-div-then-get-by-val                   6.7544+-0.0709     ^      6.0331+-0.0496        ^ definitely 1.1196x faster
   int-or-other-max-then-get-by-val                   7.7760+-0.1408     ^      7.2894+-0.2289        ^ definitely 1.0668x faster
   int-or-other-min-then-get-by-val                   7.6899+-0.1536     ^      5.8139+-0.0342        ^ definitely 1.3227x faster
   int-or-other-mod-then-get-by-val                   6.4080+-0.0381     ^      5.8178+-0.0219        ^ definitely 1.1014x faster
   int-or-other-mul-then-get-by-val                   6.7080+-0.0368     ^      5.9017+-0.1089        ^ definitely 1.1366x faster
   int-or-other-neg-then-get-by-val                   8.6255+-0.0862     ^      7.1286+-0.0652        ^ definitely 1.2100x faster
   int-or-other-neg-zero-then-get-by-val             34.0613+-0.7530     ^     29.9606+-0.4432        ^ definitely 1.1369x faster
   int-or-other-sub-then-get-by-val                  11.0312+-0.0602     ^      6.9827+-0.0602        ^ definitely 1.5798x faster
   int-or-other-sub                                   9.8011+-0.0876     ^      5.2942+-0.0826        ^ definitely 1.8513x faster
   int-overflow-local                                 6.6292+-0.0333     ?      6.6992+-0.1162        ? might be 1.0106x slower
   Int16Array-alloc-long-lived                       73.1390+-0.5970     ?     73.4673+-0.4204        ?
   Int16Array-bubble-sort-with-byteLength            44.4583+-0.0652           43.8496+-0.6595          might be 1.0139x faster
   Int16Array-bubble-sort                            43.0385+-0.6205     ?     43.1587+-0.4535        ?
   Int16Array-load-int-mul                            2.0983+-0.0184            2.0682+-0.0248          might be 1.0145x faster
   Int16Array-to-Int32Array-set                      88.4931+-0.5704           88.3392+-0.8625        
   Int32Array-alloc-large                            43.5389+-1.5417           42.6443+-0.5298          might be 1.0210x faster
   Int32Array-alloc-long-lived                       81.6274+-1.0492           81.4297+-1.0588        
   Int32Array-alloc                                   4.8140+-0.0309     ?      4.8345+-0.0376        ?
   Int32Array-Int8Array-view-alloc                   15.6361+-0.6760           15.4209+-0.1203          might be 1.0140x faster
   int52-spill                                       11.9532+-0.2852           11.9217+-0.1903        
   Int8Array-alloc-long-lived                        66.8956+-0.4681     ^     66.1199+-0.1765        ^ definitely 1.0117x faster
   Int8Array-load-with-byteLength                     5.6112+-0.2041            5.4410+-0.0500          might be 1.0313x faster
   Int8Array-load                                     5.4721+-0.0491     ?      5.4952+-0.0707        ?
   integer-divide                                    16.8358+-0.0491           16.7865+-0.0660        
   integer-modulo                                     3.2288+-0.3019            3.2127+-0.3264        
   large-int-captured                                10.5653+-0.3014           10.3374+-0.0938          might be 1.0220x faster
   large-int-neg                                     25.0369+-0.8218           24.5579+-0.3741          might be 1.0195x faster
   large-int                                         21.7424+-0.4617           21.5117+-0.2399          might be 1.0107x faster
   logical-not                                        6.7832+-0.1652     ?      6.7963+-0.1036        ?
   lots-of-fields                                    14.8171+-0.1438     ?     14.8403+-0.4178        ?
   make-indexed-storage                               4.5136+-0.2481            4.4027+-0.3477          might be 1.0252x faster
   make-rope-cse                                      6.1763+-0.0466     ?      6.2898+-0.1302        ? might be 1.0184x slower
   marsaglia-larger-ints                             59.3515+-0.4925           59.3369+-0.3666        
   marsaglia-osr-entry                               31.9013+-0.9979           31.1033+-0.2532          might be 1.0257x faster
   method-on-number                                  30.4823+-0.2393     !     32.1297+-0.4509        ! definitely 1.0540x slower
   misc-strict-eq                                    58.2399+-1.0547     ?     58.5318+-1.1103        ?
   negative-zero-divide                               0.4393+-0.0038     ^      0.4297+-0.0044        ^ definitely 1.0223x faster
   negative-zero-modulo                               0.4412+-0.0038     ?      0.4442+-0.0422        ?
   negative-zero-negate                               0.4117+-0.0052     ^      0.3985+-0.0020        ^ definitely 1.0331x faster
   nested-function-parsing                           48.9444+-0.2043     ?     49.1728+-0.3174        ?
   new-array-buffer-dead                              4.0751+-0.0890            4.0191+-0.0679          might be 1.0139x faster
   new-array-buffer-push                             10.7432+-0.1852           10.7194+-0.2671        
   new-array-dead                                    14.5467+-0.3214           14.4895+-0.3122        
   new-array-push                                     7.4941+-0.0680     ?      7.5444+-0.1058        ?
   number-test                                        4.6042+-0.0181     ?      4.6146+-0.0110        ?
   object-closure-call                                8.7343+-0.0629     !      8.9273+-0.0727        ! definitely 1.0221x slower
   object-test                                        4.9590+-0.0665     ?      5.0437+-0.1864        ? might be 1.0171x slower
   poly-chain-access-different-prototypes-simple   
                                                      4.8643+-0.0535     ^      4.4316+-0.0488        ^ definitely 1.0976x faster
   poly-chain-access-different-prototypes             3.9084+-0.1621     ^      3.6171+-0.0118        ^ definitely 1.0805x faster
   poly-chain-access-simpler                          4.8228+-0.0185     ^      4.4849+-0.0581        ^ definitely 1.0753x faster
   poly-chain-access                                  3.6425+-0.0114            3.3815+-0.4020          might be 1.0772x faster
   poly-stricteq                                     82.4596+-0.4186     ?     82.6532+-0.3895        ?
   polymorphic-array-call                             2.2229+-0.0606            2.1925+-0.0171          might be 1.0139x faster
   polymorphic-get-by-id                              4.7354+-0.0214     ?      4.7618+-0.0537        ?
   polymorphic-put-by-id                             97.4178+-38.8481    ?    105.4052+-42.1527       ? might be 1.0820x slower
   polymorphic-structure                             30.3263+-0.1656     ^     27.0142+-0.8501        ^ definitely 1.1226x faster
   polyvariant-monomorphic-get-by-id                 13.3524+-0.1412           13.3374+-0.2382        
   proto-getter-access                               14.8662+-0.2424     ^     14.1558+-0.1254        ^ definitely 1.0502x faster
   put-by-id-replace-and-transition                  12.4648+-0.1775     ?     12.8151+-0.4090        ? might be 1.0281x slower
   put-by-id-slightly-polymorphic                     4.0686+-0.0698            4.0290+-0.0283        
   put-by-id                                         20.9541+-0.4057     ?     21.0275+-0.5928        ?
   put-by-val-large-index-blank-indexing-type   
                                                     10.7115+-0.1389     ?     11.2348+-0.5498        ? might be 1.0488x slower
   put-by-val-machine-int                             4.3692+-0.1350     ?      4.4688+-0.4654        ? might be 1.0228x slower
   rare-osr-exit-on-local                            21.6838+-0.1394           21.3924+-0.2538          might be 1.0136x faster
   register-pressure-from-osr                        31.2212+-0.2422     ?     31.3674+-0.0793        ?
   setter                                             7.5921+-0.1159            7.5024+-0.1037          might be 1.0119x faster
   simple-activation-demo                            35.0973+-0.1222     !     36.4290+-0.7488        ! definitely 1.0379x slower
   simple-getter-access                              20.0142+-0.1829     !     20.4768+-0.2588        ! definitely 1.0231x slower
   slow-array-profile-convergence                     4.2000+-0.0986     ?      4.3525+-0.2188        ? might be 1.0363x slower
   slow-convergence                                   4.7245+-0.0273            4.6988+-0.0775        
   sparse-conditional                                 1.5192+-0.0573            1.4923+-0.0055          might be 1.0180x faster
   splice-to-remove                                  33.1851+-1.6955     ^     29.2023+-0.3329        ^ definitely 1.1364x faster
   string-char-code-at                               23.3587+-0.1242           23.3344+-0.0677        
   string-concat-object                               3.1954+-0.0879     ?      3.2697+-0.1049        ? might be 1.0233x slower
   string-concat-pair-object                          3.0774+-0.0535     ?      3.1381+-0.0588        ? might be 1.0197x slower
   string-concat-pair-simple                         18.7489+-0.2945     ?     18.7893+-0.2737        ?
   string-concat-simple                              18.6678+-0.4684     ?     18.9495+-0.6837        ? might be 1.0151x slower
   string-cons-repeat                                11.8708+-0.1282     ?     11.9213+-0.0261        ?
   string-cons-tower                                 10.7953+-0.0648     ?     10.9154+-0.0662        ? might be 1.0111x slower
   string-equality                                   43.9575+-0.4173     ?     43.9852+-0.2110        ?
   string-get-by-val-big-char                        14.2218+-0.1359     !     15.1602+-0.4520        ! definitely 1.0660x slower
   string-get-by-val-out-of-bounds-insane             6.3467+-0.2141            6.3134+-0.0616        
   string-get-by-val-out-of-bounds                    7.1801+-0.1119            7.1583+-0.1117        
   string-get-by-val                                  5.5511+-0.0141            5.5189+-0.0656        
   string-hash                                        2.9055+-0.0600            2.8518+-0.0088          might be 1.0188x faster
   string-long-ident-equality                        39.1691+-0.2165     ?     40.0219+-1.0088        ? might be 1.0218x slower
   string-repeat-arith                               47.6515+-1.8928           47.5643+-1.4341        
   string-sub                                       101.7502+-20.4469          95.1528+-1.3392          might be 1.0693x faster
   string-test                                        4.6122+-0.0471     ?      4.6223+-0.0624        ?
   string-var-equality                               89.8062+-0.9471           88.7625+-2.5983          might be 1.0118x faster
   structure-hoist-over-transitions                   3.9098+-0.0252            3.8639+-0.0254          might be 1.0119x faster
   substring-concat-weird                            64.2758+-0.4468     ?     64.8475+-0.6127        ?
   substring-concat                                  67.6204+-0.6601     ?     68.0475+-0.6587        ?
   substring                                         74.8326+-0.2765     ?     75.1697+-0.5944        ?
   switch-char-constant                               3.6227+-0.0100            3.6036+-0.0188        
   switch-char                                        9.1892+-0.0310     ?      9.2793+-0.1421        ?
   switch-constant                                   12.3043+-0.4645           12.2439+-0.2522        
   switch-string-basic-big-var                       25.4541+-0.8534     ?     25.7947+-0.4879        ? might be 1.0134x slower
   switch-string-basic-big                           30.8424+-1.2907     ?     31.5478+-1.6154        ? might be 1.0229x slower
   switch-string-basic-var                           30.7694+-0.5186     ?     30.9966+-0.7925        ?
   switch-string-basic                               32.8682+-2.5020           31.0568+-2.4126          might be 1.0583x faster
   switch-string-big-length-tower-var                29.8890+-0.1100     ?     29.9298+-0.3029        ?
   switch-string-length-tower-var                    23.8080+-0.1661     ?     24.3510+-0.6736        ? might be 1.0228x slower
   switch-string-length-tower                        17.3013+-0.1297     ?     17.5216+-0.4079        ? might be 1.0127x slower
   switch-string-short                               17.4650+-0.1410           17.2798+-0.1338          might be 1.0107x faster
   switch                                            16.2764+-1.0754           15.8079+-0.4951          might be 1.0296x faster
   tear-off-arguments-simple                          2.2730+-0.0370     ^      2.2255+-0.0068        ^ definitely 1.0214x faster
   tear-off-arguments                                 3.7563+-0.0868            3.6943+-0.0172          might be 1.0168x faster
   temporal-structure                                19.1652+-0.0857     !     19.8831+-0.1324        ! definitely 1.0375x slower
   to-int32-boolean                                  24.5339+-0.1068     ?     24.5812+-0.1103        ?
   undefined-test                                     4.8601+-0.0633            4.8411+-0.0560        
   unprofiled-licm                                   31.1744+-0.7325     ?     31.5694+-0.0875        ? might be 1.0127x slower
   weird-inlining-const-prop                          2.6932+-0.0807     ?      2.6932+-0.1118        ?

   <arithmetic>                                      23.4333+-0.1539           23.2177+-0.1762          might be 1.0093x faster
   <geometric> *                                     11.9055+-0.0219     ^     11.6918+-0.0233        ^ definitely 1.0183x faster
   <harmonic>                                         5.6442+-0.0121     ^      5.5381+-0.0215        ^ definitely 1.0192x faster

                                                        TipOfTree               ConstantProps                                   
AsmBench:
   bigfib.cpp                                       800.5756+-5.9465          796.4006+-5.9109        
   cray.c                                           788.2736+-2.2454     ?    789.3686+-3.7115        ?
   dry.c                                            847.1505+-68.5083    ?    886.3119+-50.4821       ? might be 1.0462x slower
   FloatMM.c                                       1146.9502+-1.6140     ?   1147.2221+-1.7175        ?
   gcc-loops.cpp                                   7565.9098+-13.1485        7559.8443+-11.2115       
   n-body.c                                        2042.4041+-6.2077         2041.9375+-1.5508        
   Quicksort.c                                      681.0657+-7.6397     ?    683.9342+-7.5917        ?
   stepanov_container.cpp                          5798.3952+-13.7968    ?   5805.6161+-22.0601       ?
   Towers.c                                         493.6302+-1.2804          491.4378+-1.1004        

   <arithmetic>                                    2240.4839+-7.3045     ?   2244.6748+-8.6907        ? might be 1.0019x slower
   <geometric> *                                   1382.3277+-12.7586    ?   1388.8921+-10.7363       ? might be 1.0047x slower
   <harmonic>                                      1015.3949+-11.7045    ?   1020.8282+-9.2550        ? might be 1.0054x slower

                                                        TipOfTree               ConstantProps                                   
All benchmarks:
   <arithmetic>                                     167.2684+-0.1553     ^    166.3419+-0.3624        ^ definitely 1.0056x faster
   <geometric>                                       19.4975+-0.0299     ^     19.2270+-0.0324        ^ definitely 1.0141x faster
   <harmonic>                                         5.0032+-0.0136     ^      4.9372+-0.0152        ^ definitely 1.0134x faster

                                                        TipOfTree               ConstantProps                                   
Geomean of preferred means:
   <scaled-result>                                   80.7374+-0.1418     ^     80.3484+-0.1575        ^ definitely 1.0048x faster
Comment 10 Filip Pizlo 2014-07-04 13:00:24 PDT
Created attachment 234419 [details]
almost done

I still need to think about this a bit more to ensure that everything is good and sound, but I'm definitely almost done.
Comment 11 Filip Pizlo 2014-07-04 13:35:57 PDT
Created attachment 234420 [details]
adding more ruggedness

Better defends against the structure changing after we fold the property.  This is almost done.
Comment 12 Filip Pizlo 2014-07-04 18:42:07 PDT
Created attachment 234427 [details]
the patch
Comment 13 Filip Pizlo 2014-07-04 19:40:34 PDT
Created attachment 234429 [details]
the patch

Improved a comment.
Comment 14 Filip Pizlo 2014-07-04 22:27:27 PDT
Created attachment 234432 [details]
the patch

More changelog.
Comment 15 Mark Hahnenberg 2014-07-07 12:22:01 PDT
Comment on attachment 234432 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234432&action=review

r=me

> Source/JavaScriptCore/ChangeLog:34
> +        cached. A put cache will create, and immediately invalidate, the watchpoint set. A get cache

A put replace cache
Comment 16 Filip Pizlo 2014-07-07 13:41:05 PDT
Landed in http://trac.webkit.org/changeset/170855