Created
October 20, 2013 00:59
-
-
Save svieira/7063516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function b() { | |
//The file goes through heuristics that turn object properties into | |
//a hash table | |
//run with | |
//d8 --enable-natives-syntax prop_heuristics.js | |
//Note that even if object has fast properties, there are still 2 kinds of | |
//fast properties (in and out of object) and only one of them is even faster. | |
//DescriptorArray::kMaxNumberOfDescriptors is 1536 as of now so I'm not even | |
//going to test that | |
function Obj255() { | |
this.prop1 = 1; this.prop2 = 1; this.prop3 = 1; this.prop4 = 1; this.prop5 = 1; this.prop6 = 1; this.prop7 = 1; this.prop8 = 1; this.prop9 = 1; this.prop10 = 1; this.prop11 = 1; this.prop12 = 1; this.prop13 = 1; this.prop14 = 1; this.prop15 = 1; this.prop16 = 1; this.prop17 = 1; this.prop18 = 1; this.prop19 = 1; this.prop20 = 1; this.prop21 = 1; this.prop22 = 1; this.prop23 = 1; this.prop24 = 1; this.prop25 = 1; this.prop26 = 1; this.prop27 = 1; this.prop28 = 1; this.prop29 = 1; this.prop30 = 1; this.prop31 = 1; this.prop32 = 1; this.prop33 = 1; this.prop34 = 1; this.prop35 = 1; this.prop36 = 1; this.prop37 = 1; this.prop38 = 1; this.prop39 = 1; this.prop40 = 1; this.prop41 = 1; this.prop42 = 1; this.prop43 = 1; this.prop44 = 1; this.prop45 = 1; this.prop46 = 1; this.prop47 = 1; this.prop48 = 1; this.prop49 = 1; this.prop50 = 1; this.prop51 = 1; this.prop52 = 1; this.prop53 = 1; this.prop54 = 1; this.prop55 = 1; this.prop56 = 1; this.prop57 = 1; this.prop58 = 1; this.prop59 = 1; this.prop60 = 1; | |
this.prop61 = 1; this.prop62 = 1; this.prop63 = 1; this.prop64 = 1; this.prop65 = 1; this.prop66 = 1; this.prop67 = 1; this.prop68 = 1; this.prop69 = 1; this.prop70 = 1; this.prop71 = 1; this.prop72 = 1; this.prop73 = 1; this.prop74 = 1; this.prop75 = 1; this.prop76 = 1; this.prop77 = 1; this.prop78 = 1; this.prop79 = 1; this.prop80 = 1; this.prop81 = 1; this.prop82 = 1; this.prop83 = 1; this.prop84 = 1; this.prop85 = 1; this.prop86 = 1; this.prop87 = 1; this.prop88 = 1; this.prop89 = 1; this.prop90 = 1; this.prop91 = 1; this.prop92 = 1; this.prop93 = 1; this.prop94 = 1; this.prop95 = 1; this.prop96 = 1; this.prop97 = 1; this.prop98 = 1; this.prop99 = 1; this.prop100 = 1; this.prop101 = 1; this.prop102 = 1; this.prop103 = 1; this.prop104 = 1; this.prop105 = 1; this.prop106 = 1; this.prop107 = 1; this.prop108 = 1; this.prop109 = 1; this.prop110 = 1; this.prop111 = 1; this.prop112 = 1; this.prop113 = 1; this.prop114 = 1; this.prop115 = 1; this.prop116 = 1; this.prop117 = 1; this.prop118 = 1; this.prop119 = 1; this.prop120 = 1; | |
this.prop121 = 1; this.prop122 = 1; this.prop123 = 1; this.prop124 = 1; this.prop125 = 1; this.prop126 = 1; this.prop127 = 1; this.prop128 = 1; this.prop129 = 1; this.prop130 = 1; this.prop131 = 1; this.prop132 = 1; this.prop133 = 1; this.prop134 = 1; this.prop135 = 1; this.prop136 = 1; this.prop137 = 1; this.prop138 = 1; this.prop139 = 1; this.prop140 = 1; this.prop141 = 1; this.prop142 = 1; this.prop143 = 1; this.prop144 = 1; this.prop145 = 1; this.prop146 = 1; this.prop147 = 1; this.prop148 = 1; this.prop149 = 1; this.prop150 = 1; this.prop151 = 1; this.prop152 = 1; this.prop153 = 1; this.prop154 = 1; this.prop155 = 1; this.prop156 = 1; this.prop157 = 1; this.prop158 = 1; this.prop159 = 1; this.prop160 = 1; this.prop161 = 1; this.prop162 = 1; this.prop163 = 1; this.prop164 = 1; this.prop165 = 1; this.prop166 = 1; this.prop167 = 1; this.prop168 = 1; this.prop169 = 1; this.prop170 = 1; this.prop171 = 1; this.prop172 = 1; this.prop173 = 1; this.prop174 = 1; this.prop175 = 1; this.prop176 = 1; this.prop177 = 1; this.prop178 = 1; this.prop179 = 1; this.prop180 = 1; | |
this.prop181 = 1; this.prop182 = 1; this.prop183 = 1; this.prop184 = 1; this.prop185 = 1; this.prop186 = 1; this.prop187 = 1; this.prop188 = 1; this.prop189 = 1; this.prop190 = 1; this.prop191 = 1; this.prop192 = 1; this.prop193 = 1; this.prop194 = 1; this.prop195 = 1; this.prop196 = 1; this.prop197 = 1; this.prop198 = 1; this.prop199 = 1; this.prop200 = 1; this.prop201 = 1; this.prop202 = 1; this.prop203 = 1; this.prop204 = 1; this.prop205 = 1; this.prop206 = 1; this.prop207 = 1; this.prop208 = 1; this.prop209 = 1; this.prop210 = 1; this.prop211 = 1; this.prop212 = 1; this.prop213 = 1; this.prop214 = 1; this.prop215 = 1; this.prop216 = 1; this.prop217 = 1; this.prop218 = 1; this.prop219 = 1; this.prop220 = 1; this.prop221 = 1; this.prop222 = 1; this.prop223 = 1; this.prop224 = 1; this.prop225 = 1; this.prop226 = 1; this.prop227 = 1; this.prop228 = 1; this.prop229 = 1; this.prop230 = 1; this.prop231 = 1; this.prop232 = 1; this.prop233 = 1; this.prop234 = 1; this.prop235 = 1; this.prop236 = 1; this.prop237 = 1; this.prop238 = 1; this.prop239 = 1; this.prop240 = 1; | |
this.prop241 = 1; this.prop242 = 1; this.prop243 = 1; this.prop244 = 1; this.prop245 = 1; this.prop246 = 1; this.prop247 = 1; this.prop248 = 1; this.prop249 = 1; this.prop250 = 1; this.prop251 = 1; this.prop252 = 1; this.prop253 = 1; this.prop254 = 1; this.prop255 = 1; this.prop256 = 1; | |
} | |
function Obj1030() { | |
this.prop1 = 1;this.prop2 = 2;this.prop3 = 3;this.prop4 = 4;this.prop5 = 5;this.prop6 = 6;this.prop7 = 7;this.prop8 = 8;this.prop9 = 9;this.prop10 = 10;this.prop11 = 11;this.prop12 = 12;this.prop13 = 13;this.prop14 = 14;this.prop15 = 15;this.prop16 = 16;this.prop17 = 17;this.prop18 = 18;this.prop19 = 19;this.prop20 = 20;this.prop21 = 21;this.prop22 = 22;this.prop23 = 23;this.prop24 = 24;this.prop25 = 25;this.prop26 = 26;this.prop27 = 27;this.prop28 = 28;this.prop29 = 29;this.prop30 = 30;this.prop31 = 31;this.prop32 = 32;this.prop33 = 33;this.prop34 = 34;this.prop35 = 35;this.prop36 = 36;this.prop37 = 37;this.prop38 = 38;this.prop39 = 39;this.prop40 = 40;this.prop41 = 41;this.prop42 = 42;this.prop43 = 43;this.prop44 = 44;this.prop45 = 45;this.prop46 = 46;this.prop47 = 47;this.prop48 = 48;this.prop49 = 49;this.prop50 = 50;this.prop51 = 51;this.prop52 = 52;this.prop53 = 53;this.prop54 = 54;this.prop55 = 55;this.prop56 = 56;this.prop57 = 57;this.prop58 = 58;this.prop59 = 59;this.prop60 = 60;this.prop61 = 61;this.prop62 = 62;this.prop63 = 63;this.prop64 = 64;this.prop65 = 65;this.prop66 = 66;this.prop67 = 67;this.prop68 = 68;this.prop69 = 69;this.prop70 = 70;this.prop71 = 71;this.prop72 = 72;this.prop73 = 73;this.prop74 = 74;this.prop75 = 75;this.prop76 = 76;this.prop77 = 77;this.prop78 = 78;this.prop79 = 79;this.prop80 = 80;this.prop81 = 81;this.prop82 = 82;this.prop83 = 83;this.prop84 = 84;this.prop85 = 85;this.prop86 = 86;this.prop87 = 87;this.prop88 = 88;this.prop89 = 89;this.prop90 = 90;this.prop91 = 91;this.prop92 = 92;this.prop93 = 93;this.prop94 = 94;this.prop95 = 95;this.prop96 = 96;this.prop97 = 97;this.prop98 = 98;this.prop99 = 99;this.prop100 = 100; | |
this.prop101 = 101;this.prop102 = 102;this.prop103 = 103;this.prop104 = 104;this.prop105 = 105;this.prop106 = 106;this.prop107 = 107;this.prop108 = 108;this.prop109 = 109;this.prop110 = 110;this.prop111 = 111;this.prop112 = 112;this.prop113 = 113;this.prop114 = 114;this.prop115 = 115;this.prop116 = 116;this.prop117 = 117;this.prop118 = 118;this.prop119 = 119;this.prop120 = 120;this.prop121 = 121;this.prop122 = 122;this.prop123 = 123;this.prop124 = 124;this.prop125 = 125;this.prop126 = 126;this.prop127 = 127;this.prop128 = 128;this.prop129 = 129;this.prop130 = 130;this.prop131 = 131;this.prop132 = 132;this.prop133 = 133;this.prop134 = 134;this.prop135 = 135;this.prop136 = 136;this.prop137 = 137;this.prop138 = 138;this.prop139 = 139;this.prop140 = 140;this.prop141 = 141;this.prop142 = 142;this.prop143 = 143;this.prop144 = 144;this.prop145 = 145;this.prop146 = 146;this.prop147 = 147;this.prop148 = 148;this.prop149 = 149;this.prop150 = 150;this.prop151 = 151;this.prop152 = 152;this.prop153 = 153;this.prop154 = 154;this.prop155 = 155;this.prop156 = 156;this.prop157 = 157;this.prop158 = 158;this.prop159 = 159;this.prop160 = 160;this.prop161 = 161;this.prop162 = 162;this.prop163 = 163;this.prop164 = 164;this.prop165 = 165;this.prop166 = 166;this.prop167 = 167;this.prop168 = 168;this.prop169 = 169;this.prop170 = 170;this.prop171 = 171;this.prop172 = 172;this.prop173 = 173;this.prop174 = 174;this.prop175 = 175;this.prop176 = 176;this.prop177 = 177;this.prop178 = 178;this.prop179 = 179;this.prop180 = 180;this.prop181 = 181;this.prop182 = 182;this.prop183 = 183;this.prop184 = 184;this.prop185 = 185;this.prop186 = 186;this.prop187 = 187;this.prop188 = 188;this.prop189 = 189;this.prop190 = 190;this.prop191 = 191;this.prop192 = 192;this.prop193 = 193;this.prop194 = 194;this.prop195 = 195;this.prop196 = 196;this.prop197 = 197;this.prop198 = 198;this.prop199 = 199;this.prop200 = 200; | |
this.prop201 = 201;this.prop202 = 202;this.prop203 = 203;this.prop204 = 204;this.prop205 = 205;this.prop206 = 206;this.prop207 = 207;this.prop208 = 208;this.prop209 = 209;this.prop210 = 210;this.prop211 = 211;this.prop212 = 212;this.prop213 = 213;this.prop214 = 214;this.prop215 = 215;this.prop216 = 216;this.prop217 = 217;this.prop218 = 218;this.prop219 = 219;this.prop220 = 220;this.prop221 = 221;this.prop222 = 222;this.prop223 = 223;this.prop224 = 224;this.prop225 = 225;this.prop226 = 226;this.prop227 = 227;this.prop228 = 228;this.prop229 = 229;this.prop230 = 230;this.prop231 = 231;this.prop232 = 232;this.prop233 = 233;this.prop234 = 234;this.prop235 = 235;this.prop236 = 236;this.prop237 = 237;this.prop238 = 238;this.prop239 = 239;this.prop240 = 240;this.prop241 = 241;this.prop242 = 242;this.prop243 = 243;this.prop244 = 244;this.prop245 = 245;this.prop246 = 246;this.prop247 = 247;this.prop248 = 248;this.prop249 = 249;this.prop250 = 250;this.prop251 = 251;this.prop252 = 252;this.prop253 = 253;this.prop254 = 254;this.prop255 = 255;this.prop256 = 256;this.prop257 = 257;this.prop258 = 258;this.prop259 = 259;this.prop260 = 260;this.prop261 = 261;this.prop262 = 262;this.prop263 = 263;this.prop264 = 264;this.prop265 = 265;this.prop266 = 266;this.prop267 = 267;this.prop268 = 268;this.prop269 = 269;this.prop270 = 270;this.prop271 = 271;this.prop272 = 272;this.prop273 = 273;this.prop274 = 274;this.prop275 = 275;this.prop276 = 276;this.prop277 = 277;this.prop278 = 278;this.prop279 = 279;this.prop280 = 280;this.prop281 = 281;this.prop282 = 282;this.prop283 = 283;this.prop284 = 284;this.prop285 = 285;this.prop286 = 286;this.prop287 = 287;this.prop288 = 288;this.prop289 = 289;this.prop290 = 290;this.prop291 = 291;this.prop292 = 292;this.prop293 = 293;this.prop294 = 294;this.prop295 = 295;this.prop296 = 296;this.prop297 = 297;this.prop298 = 298;this.prop299 = 299;this.prop300 = 300; | |
this.prop301 = 301;this.prop302 = 302;this.prop303 = 303;this.prop304 = 304;this.prop305 = 305;this.prop306 = 306;this.prop307 = 307;this.prop308 = 308;this.prop309 = 309;this.prop310 = 310;this.prop311 = 311;this.prop312 = 312;this.prop313 = 313;this.prop314 = 314;this.prop315 = 315;this.prop316 = 316;this.prop317 = 317;this.prop318 = 318;this.prop319 = 319;this.prop320 = 320;this.prop321 = 321;this.prop322 = 322;this.prop323 = 323;this.prop324 = 324;this.prop325 = 325;this.prop326 = 326;this.prop327 = 327;this.prop328 = 328;this.prop329 = 329;this.prop330 = 330;this.prop331 = 331;this.prop332 = 332;this.prop333 = 333;this.prop334 = 334;this.prop335 = 335;this.prop336 = 336;this.prop337 = 337;this.prop338 = 338;this.prop339 = 339;this.prop340 = 340;this.prop341 = 341;this.prop342 = 342;this.prop343 = 343;this.prop344 = 344;this.prop345 = 345;this.prop346 = 346;this.prop347 = 347;this.prop348 = 348;this.prop349 = 349;this.prop350 = 350;this.prop351 = 351;this.prop352 = 352;this.prop353 = 353;this.prop354 = 354;this.prop355 = 355;this.prop356 = 356;this.prop357 = 357;this.prop358 = 358;this.prop359 = 359;this.prop360 = 360;this.prop361 = 361;this.prop362 = 362;this.prop363 = 363;this.prop364 = 364;this.prop365 = 365;this.prop366 = 366;this.prop367 = 367;this.prop368 = 368;this.prop369 = 369;this.prop370 = 370;this.prop371 = 371;this.prop372 = 372;this.prop373 = 373;this.prop374 = 374;this.prop375 = 375;this.prop376 = 376;this.prop377 = 377;this.prop378 = 378;this.prop379 = 379;this.prop380 = 380;this.prop381 = 381;this.prop382 = 382;this.prop383 = 383;this.prop384 = 384;this.prop385 = 385;this.prop386 = 386;this.prop387 = 387;this.prop388 = 388;this.prop389 = 389;this.prop390 = 390;this.prop391 = 391;this.prop392 = 392;this.prop393 = 393;this.prop394 = 394;this.prop395 = 395;this.prop396 = 396;this.prop397 = 397;this.prop398 = 398;this.prop399 = 399;this.prop400 = 400; | |
this.prop401 = 401;this.prop402 = 402;this.prop403 = 403;this.prop404 = 404;this.prop405 = 405;this.prop406 = 406;this.prop407 = 407;this.prop408 = 408;this.prop409 = 409;this.prop410 = 410;this.prop411 = 411;this.prop412 = 412;this.prop413 = 413;this.prop414 = 414;this.prop415 = 415;this.prop416 = 416;this.prop417 = 417;this.prop418 = 418;this.prop419 = 419;this.prop420 = 420;this.prop421 = 421;this.prop422 = 422;this.prop423 = 423;this.prop424 = 424;this.prop425 = 425;this.prop426 = 426;this.prop427 = 427;this.prop428 = 428;this.prop429 = 429;this.prop430 = 430;this.prop431 = 431;this.prop432 = 432;this.prop433 = 433;this.prop434 = 434;this.prop435 = 435;this.prop436 = 436;this.prop437 = 437;this.prop438 = 438;this.prop439 = 439;this.prop440 = 440;this.prop441 = 441;this.prop442 = 442;this.prop443 = 443;this.prop444 = 444;this.prop445 = 445;this.prop446 = 446;this.prop447 = 447;this.prop448 = 448;this.prop449 = 449;this.prop450 = 450;this.prop451 = 451;this.prop452 = 452;this.prop453 = 453;this.prop454 = 454;this.prop455 = 455;this.prop456 = 456;this.prop457 = 457;this.prop458 = 458;this.prop459 = 459;this.prop460 = 460;this.prop461 = 461;this.prop462 = 462;this.prop463 = 463;this.prop464 = 464;this.prop465 = 465;this.prop466 = 466;this.prop467 = 467;this.prop468 = 468;this.prop469 = 469;this.prop470 = 470;this.prop471 = 471;this.prop472 = 472;this.prop473 = 473;this.prop474 = 474;this.prop475 = 475;this.prop476 = 476;this.prop477 = 477;this.prop478 = 478;this.prop479 = 479;this.prop480 = 480;this.prop481 = 481;this.prop482 = 482;this.prop483 = 483;this.prop484 = 484;this.prop485 = 485;this.prop486 = 486;this.prop487 = 487;this.prop488 = 488;this.prop489 = 489;this.prop490 = 490;this.prop491 = 491;this.prop492 = 492;this.prop493 = 493;this.prop494 = 494;this.prop495 = 495;this.prop496 = 496;this.prop497 = 497;this.prop498 = 498;this.prop499 = 499;this.prop500 = 500; | |
this.prop501 = 501;this.prop502 = 502;this.prop503 = 503;this.prop504 = 504;this.prop505 = 505;this.prop506 = 506;this.prop507 = 507;this.prop508 = 508;this.prop509 = 509;this.prop510 = 510;this.prop511 = 511;this.prop512 = 512;this.prop513 = 513;this.prop514 = 514;this.prop515 = 515;this.prop516 = 516;this.prop517 = 517;this.prop518 = 518;this.prop519 = 519;this.prop520 = 520;this.prop521 = 521;this.prop522 = 522;this.prop523 = 523;this.prop524 = 524;this.prop525 = 525;this.prop526 = 526;this.prop527 = 527;this.prop528 = 528;this.prop529 = 529;this.prop530 = 530;this.prop531 = 531;this.prop532 = 532;this.prop533 = 533;this.prop534 = 534;this.prop535 = 535;this.prop536 = 536;this.prop537 = 537;this.prop538 = 538;this.prop539 = 539;this.prop540 = 540;this.prop541 = 541;this.prop542 = 542;this.prop543 = 543;this.prop544 = 544;this.prop545 = 545;this.prop546 = 546;this.prop547 = 547;this.prop548 = 548;this.prop549 = 549;this.prop550 = 550;this.prop551 = 551;this.prop552 = 552;this.prop553 = 553;this.prop554 = 554;this.prop555 = 555;this.prop556 = 556;this.prop557 = 557;this.prop558 = 558;this.prop559 = 559;this.prop560 = 560;this.prop561 = 561;this.prop562 = 562;this.prop563 = 563;this.prop564 = 564;this.prop565 = 565;this.prop566 = 566;this.prop567 = 567;this.prop568 = 568;this.prop569 = 569;this.prop570 = 570;this.prop571 = 571;this.prop572 = 572;this.prop573 = 573;this.prop574 = 574;this.prop575 = 575;this.prop576 = 576;this.prop577 = 577;this.prop578 = 578;this.prop579 = 579;this.prop580 = 580;this.prop581 = 581;this.prop582 = 582;this.prop583 = 583;this.prop584 = 584;this.prop585 = 585;this.prop586 = 586;this.prop587 = 587;this.prop588 = 588;this.prop589 = 589;this.prop590 = 590;this.prop591 = 591;this.prop592 = 592;this.prop593 = 593;this.prop594 = 594;this.prop595 = 595;this.prop596 = 596;this.prop597 = 597;this.prop598 = 598;this.prop599 = 599;this.prop600 = 600; | |
this.prop601 = 601;this.prop602 = 602;this.prop603 = 603;this.prop604 = 604;this.prop605 = 605;this.prop606 = 606;this.prop607 = 607;this.prop608 = 608;this.prop609 = 609;this.prop610 = 610;this.prop611 = 611;this.prop612 = 612;this.prop613 = 613;this.prop614 = 614;this.prop615 = 615;this.prop616 = 616;this.prop617 = 617;this.prop618 = 618;this.prop619 = 619;this.prop620 = 620;this.prop621 = 621;this.prop622 = 622;this.prop623 = 623;this.prop624 = 624;this.prop625 = 625;this.prop626 = 626;this.prop627 = 627;this.prop628 = 628;this.prop629 = 629;this.prop630 = 630;this.prop631 = 631;this.prop632 = 632;this.prop633 = 633;this.prop634 = 634;this.prop635 = 635;this.prop636 = 636;this.prop637 = 637;this.prop638 = 638;this.prop639 = 639;this.prop640 = 640;this.prop641 = 641;this.prop642 = 642;this.prop643 = 643;this.prop644 = 644;this.prop645 = 645;this.prop646 = 646;this.prop647 = 647;this.prop648 = 648;this.prop649 = 649;this.prop650 = 650;this.prop651 = 651;this.prop652 = 652;this.prop653 = 653;this.prop654 = 654;this.prop655 = 655;this.prop656 = 656;this.prop657 = 657;this.prop658 = 658;this.prop659 = 659;this.prop660 = 660;this.prop661 = 661;this.prop662 = 662;this.prop663 = 663;this.prop664 = 664;this.prop665 = 665;this.prop666 = 666;this.prop667 = 667;this.prop668 = 668;this.prop669 = 669;this.prop670 = 670;this.prop671 = 671;this.prop672 = 672;this.prop673 = 673;this.prop674 = 674;this.prop675 = 675;this.prop676 = 676;this.prop677 = 677;this.prop678 = 678;this.prop679 = 679;this.prop680 = 680;this.prop681 = 681;this.prop682 = 682;this.prop683 = 683;this.prop684 = 684;this.prop685 = 685;this.prop686 = 686;this.prop687 = 687;this.prop688 = 688;this.prop689 = 689;this.prop690 = 690;this.prop691 = 691;this.prop692 = 692;this.prop693 = 693;this.prop694 = 694;this.prop695 = 695;this.prop696 = 696;this.prop697 = 697;this.prop698 = 698;this.prop699 = 699;this.prop700 = 700; | |
this.prop701 = 701;this.prop702 = 702;this.prop703 = 703;this.prop704 = 704;this.prop705 = 705;this.prop706 = 706;this.prop707 = 707;this.prop708 = 708;this.prop709 = 709;this.prop710 = 710;this.prop711 = 711;this.prop712 = 712;this.prop713 = 713;this.prop714 = 714;this.prop715 = 715;this.prop716 = 716;this.prop717 = 717;this.prop718 = 718;this.prop719 = 719;this.prop720 = 720;this.prop721 = 721;this.prop722 = 722;this.prop723 = 723;this.prop724 = 724;this.prop725 = 725;this.prop726 = 726;this.prop727 = 727;this.prop728 = 728;this.prop729 = 729;this.prop730 = 730;this.prop731 = 731;this.prop732 = 732;this.prop733 = 733;this.prop734 = 734;this.prop735 = 735;this.prop736 = 736;this.prop737 = 737;this.prop738 = 738;this.prop739 = 739;this.prop740 = 740;this.prop741 = 741;this.prop742 = 742;this.prop743 = 743;this.prop744 = 744;this.prop745 = 745;this.prop746 = 746;this.prop747 = 747;this.prop748 = 748;this.prop749 = 749;this.prop750 = 750;this.prop751 = 751;this.prop752 = 752;this.prop753 = 753;this.prop754 = 754;this.prop755 = 755;this.prop756 = 756;this.prop757 = 757;this.prop758 = 758;this.prop759 = 759;this.prop760 = 760;this.prop761 = 761;this.prop762 = 762;this.prop763 = 763;this.prop764 = 764;this.prop765 = 765;this.prop766 = 766;this.prop767 = 767;this.prop768 = 768;this.prop769 = 769;this.prop770 = 770;this.prop771 = 771;this.prop772 = 772;this.prop773 = 773;this.prop774 = 774;this.prop775 = 775;this.prop776 = 776;this.prop777 = 777;this.prop778 = 778;this.prop779 = 779;this.prop780 = 780;this.prop781 = 781;this.prop782 = 782;this.prop783 = 783;this.prop784 = 784;this.prop785 = 785;this.prop786 = 786;this.prop787 = 787;this.prop788 = 788;this.prop789 = 789;this.prop790 = 790;this.prop791 = 791;this.prop792 = 792;this.prop793 = 793;this.prop794 = 794;this.prop795 = 795;this.prop796 = 796;this.prop797 = 797;this.prop798 = 798;this.prop799 = 799;this.prop800 = 800; | |
this.prop801 = 801;this.prop802 = 802;this.prop803 = 803;this.prop804 = 804;this.prop805 = 805;this.prop806 = 806;this.prop807 = 807;this.prop808 = 808;this.prop809 = 809;this.prop810 = 810;this.prop811 = 811;this.prop812 = 812;this.prop813 = 813;this.prop814 = 814;this.prop815 = 815;this.prop816 = 816;this.prop817 = 817;this.prop818 = 818;this.prop819 = 819;this.prop820 = 820;this.prop821 = 821;this.prop822 = 822;this.prop823 = 823;this.prop824 = 824;this.prop825 = 825;this.prop826 = 826;this.prop827 = 827;this.prop828 = 828;this.prop829 = 829;this.prop830 = 830;this.prop831 = 831;this.prop832 = 832;this.prop833 = 833;this.prop834 = 834;this.prop835 = 835;this.prop836 = 836;this.prop837 = 837;this.prop838 = 838;this.prop839 = 839;this.prop840 = 840;this.prop841 = 841;this.prop842 = 842;this.prop843 = 843;this.prop844 = 844;this.prop845 = 845;this.prop846 = 846;this.prop847 = 847;this.prop848 = 848;this.prop849 = 849;this.prop850 = 850;this.prop851 = 851;this.prop852 = 852;this.prop853 = 853;this.prop854 = 854;this.prop855 = 855;this.prop856 = 856;this.prop857 = 857;this.prop858 = 858;this.prop859 = 859;this.prop860 = 860;this.prop861 = 861;this.prop862 = 862;this.prop863 = 863;this.prop864 = 864;this.prop865 = 865;this.prop866 = 866;this.prop867 = 867;this.prop868 = 868;this.prop869 = 869;this.prop870 = 870;this.prop871 = 871;this.prop872 = 872;this.prop873 = 873;this.prop874 = 874;this.prop875 = 875;this.prop876 = 876;this.prop877 = 877;this.prop878 = 878;this.prop879 = 879;this.prop880 = 880;this.prop881 = 881;this.prop882 = 882;this.prop883 = 883;this.prop884 = 884;this.prop885 = 885;this.prop886 = 886;this.prop887 = 887;this.prop888 = 888;this.prop889 = 889;this.prop890 = 890;this.prop891 = 891;this.prop892 = 892;this.prop893 = 893;this.prop894 = 894;this.prop895 = 895;this.prop896 = 896;this.prop897 = 897;this.prop898 = 898;this.prop899 = 899;this.prop900 = 900; | |
this.prop901 = 901;this.prop902 = 902;this.prop903 = 903;this.prop904 = 904;this.prop905 = 905;this.prop906 = 906;this.prop907 = 907;this.prop908 = 908;this.prop909 = 909;this.prop910 = 910;this.prop911 = 911;this.prop912 = 912;this.prop913 = 913;this.prop914 = 914;this.prop915 = 915;this.prop916 = 916;this.prop917 = 917;this.prop918 = 918;this.prop919 = 919;this.prop920 = 920;this.prop921 = 921;this.prop922 = 922;this.prop923 = 923;this.prop924 = 924;this.prop925 = 925;this.prop926 = 926;this.prop927 = 927;this.prop928 = 928;this.prop929 = 929;this.prop930 = 930;this.prop931 = 931;this.prop932 = 932;this.prop933 = 933;this.prop934 = 934;this.prop935 = 935;this.prop936 = 936;this.prop937 = 937;this.prop938 = 938;this.prop939 = 939;this.prop940 = 940;this.prop941 = 941;this.prop942 = 942;this.prop943 = 943;this.prop944 = 944;this.prop945 = 945;this.prop946 = 946;this.prop947 = 947;this.prop948 = 948;this.prop949 = 949;this.prop950 = 950;this.prop951 = 951;this.prop952 = 952;this.prop953 = 953;this.prop954 = 954;this.prop955 = 955;this.prop956 = 956;this.prop957 = 957;this.prop958 = 958;this.prop959 = 959;this.prop960 = 960;this.prop961 = 961;this.prop962 = 962;this.prop963 = 963;this.prop964 = 964;this.prop965 = 965;this.prop966 = 966;this.prop967 = 967;this.prop968 = 968;this.prop969 = 969;this.prop970 = 970;this.prop971 = 971;this.prop972 = 972;this.prop973 = 973;this.prop974 = 974;this.prop975 = 975;this.prop976 = 976;this.prop977 = 977;this.prop978 = 978;this.prop979 = 979;this.prop980 = 980;this.prop981 = 981;this.prop982 = 982;this.prop983 = 983;this.prop984 = 984;this.prop985 = 985;this.prop986 = 986;this.prop987 = 987;this.prop988 = 988;this.prop989 = 989;this.prop990 = 990;this.prop991 = 991;this.prop992 = 992;this.prop993 = 993;this.prop994 = 994;this.prop995 = 995;this.prop996 = 996;this.prop997 = 997;this.prop998 = 998;this.prop999 = 999;this.prop1000 = 1000; | |
this.prop1001 = 1001;this.prop1002 = 1002;this.prop1003 = 1003;this.prop1004 = 1004;this.prop1005 = 1005;this.prop1006 = 1006;this.prop1007 = 1007;this.prop1008 = 1008;this.prop1009 = 1009;this.prop1010 = 1010;this.prop1011 = 1011;this.prop1012 = 1012;this.prop1013 = 1013;this.prop1014 = 1014;this.prop1015 = 1015;this.prop1016 = 1016;this.prop1017 = 1017;this.prop1018 = 1018;this.prop1019 = 1019;this.prop1020 = 1020;this.prop1021 = 1021;this.prop1022 = 1022;this.prop1023 = 1023;this.prop1024 = 1024;this.prop1025 = 1025;this.prop1026 = 1026;this.prop1027 = 1027;this.prop1028 = 1028;this.prop1029 = 1029;this.prop1030 = 1030; | |
} | |
var obj1 = Object.freeze({a: 3}); | |
var obj2 = Object.seal({a: 3}); | |
var obj3 = Object.preventExtensions({a: 3}); | |
var obj4 = {"-a": 3}; | |
var obj5 = {"_a": 3}; | |
var obj6 = {a: 3}; | |
delete obj6.a; | |
var obj7 = Object.create(null); | |
var obj8 = { | |
set asd() { | |
} | |
}; | |
var obj9 = {a: 3}; | |
Object.defineProperty( obj9, "b", { | |
set: function() { | |
}, | |
enumerable: false, | |
configurable: false | |
}); | |
var obj10 = {}; | |
obj10.prop1 = 1; obj10.prop2 = 2; obj10.prop3 = 3; obj10.prop4 = 4; obj10.prop5 = 5; obj10.prop6 = 6; obj10.prop7 = 7; obj10.prop8 = 8; obj10.prop9 = 9; obj10.prop10 = 10; | |
obj10.prop11 = 11; obj10.prop12 = 12; obj10.prop13 = 13; obj10.prop14 = 14; obj10.prop15 = 15; obj10.prop16 = 16; obj10.prop17 = 17; obj10.prop18 = 18; obj10.prop19 = 19; obj10.prop20 = 20; | |
obj10.prop21 = 21; obj10.prop22 = 22; obj10.prop23 = 23; obj10.prop24 = 24; obj10.prop25 = 25; obj10.prop26 = 26; obj10.prop27 = 27; obj10.prop28 = 28; obj10.prop29 = 29; obj10.prop30 = 30; | |
obj10.prop31 = 31; obj10.prop32 = 32; obj10.prop33 = 33; obj10.prop34 = 34; obj10.prop35 = 35; obj10.prop36 = 36; obj10.prop37 = 37; obj10.prop38 = 38; obj10.prop39 = 39; obj10.prop40 = 40; | |
obj10.prop41 = 41; obj10.prop42 = 42; obj10.prop43 = 43; obj10.prop44 = 44; obj10.prop45 = 45; obj10.prop46 = 46; obj10.prop47 = 47; obj10.prop48 = 48; obj10.prop49 = 49; obj10.prop50 = 50; | |
obj10.prop51 = 51; obj10.prop52 = 52; obj10.prop53 = 53; obj10.prop54 = 54; obj10.prop55 = 55; obj10.prop56 = 56; obj10.prop57 = 57; obj10.prop58 = 58; obj10.prop59 = 59; obj10.prop60 = 60; | |
obj10.prop61 = 61; obj10.prop62 = 62; obj10.prop63 = 63; obj10.prop64 = 64; obj10.prop65 = 65; obj10.prop66 = 66; obj10.prop67 = 67; | |
var obj11 = {}; | |
obj11.prop1 = 1; obj11.prop2 = 2; obj11.prop3 = 3; obj11.prop4 = 4; obj11.prop5 = 5; obj11.prop6 = 6; obj11.prop7 = 7; obj11.prop8 = 8; obj11.prop9 = 9; obj11.prop10 = 10; | |
obj11.prop11 = 11; obj11.prop12 = 12; obj11.prop13 = 13; obj11.prop14 = 14; obj11.prop15 = 15; obj11.prop16 = 16; obj11.prop17 = 17; obj11.prop18 = 18; obj11.prop19 = 19; obj11.prop20 = 20; | |
obj11.prop21 = 21; obj11.prop22 = 22; obj11.prop23 = 23; obj11.prop24 = 24; obj11.prop25 = 25; obj11.prop26 = 26; obj11.prop27 = 27; obj11.prop28 = 28; obj11.prop29 = 29; obj11.prop30 = 30; | |
obj11.prop31 = 31; obj11.prop32 = 32; obj11.prop33 = 33; obj11.prop34 = 34; obj11.prop35 = 35; obj11.prop36 = 36; obj11.prop37 = 37; obj11.prop38 = 38; obj11.prop39 = 39; obj11.prop40 = 40; | |
obj11.prop41 = 41; obj11.prop42 = 42; obj11.prop43 = 43; obj11.prop44 = 44; obj11.prop45 = 45; obj11.prop46 = 46; obj11.prop47 = 47; obj11.prop48 = 48; obj11.prop49 = 49; obj11.prop50 = 50; | |
obj11.prop51 = 51; obj11.prop52 = 52; obj11.prop53 = 53; obj11.prop54 = 54; obj11.prop55 = 55; obj11.prop56 = 56; obj11.prop57 = 57; obj11.prop58 = 58; obj11.prop59 = 59; obj11.prop60 = 60; | |
obj11.prop61 = 61; obj11.prop62 = 62; obj11.prop63 = 63; obj11.prop64 = 64; obj11.prop65 = 65; obj11.prop66 = 66; | |
var obj12 = {}; | |
var l = 16; | |
while(l--) { | |
obj12["prop"+l] = l; | |
} | |
var obj13 = {}; | |
var l = 15; | |
while(l--) { | |
obj13["prop"+l] = l; | |
} | |
var obj14 = new Obj255(); | |
var obj15 = new Obj1030(); | |
var obj16 = {a: 3}; | |
Object.defineProperty(obj16, "a", { | |
value: 4, | |
writable: false | |
}); | |
function format(b) { | |
return b ? "Optimized fast properties" | |
: "Hash table slowness" | |
} | |
print("Frozen | ", format(%HasFastProperties(obj1))); | |
print("Sealed | ", format(%HasFastProperties(obj2))); | |
print("Extensions prevented | ", format(%HasFastProperties(obj3))); | |
print("Non identifier keys | ", format(%HasFastProperties(obj4))); | |
print("Identifier keys | ", format(%HasFastProperties(obj5))); | |
print("Deleting a property | ", format(%HasFastProperties(obj6))); | |
print("Null proto | ", format(%HasFastProperties(obj7))); | |
print("accessor function syntactically | ", format(%HasFastProperties(obj8))); | |
print("accessor function dynamically with configured meta props | ", format(%HasFastProperties(obj9))); | |
print(Object.keys(obj10).length, " out of object static properties | ", format(%HasFastProperties(obj10))); | |
print(Object.keys(obj11).length, " out of object static properties | ", format(%HasFastProperties(obj11))); | |
print(Object.keys(obj12).length, " out of object dynamic properties | ", format(%HasFastProperties(obj12))); | |
print(Object.keys(obj13).length, " out of object dynamic properties | ", format(%HasFastProperties(obj13))); | |
print(Object.keys(obj14).length, " in object properties | ", format(%HasFastProperties(obj14))); | |
print(Object.keys(obj15).length, " in object properties | ", format(%HasFastProperties(obj15))); | |
print("Change property form writable to unwritable | ", format(%HasFastProperties(obj16))); | |
function Person(){} | |
if( %HasFastProperties(obj6)) { | |
throw new Error("Expecting obj6 to have slow properties"); | |
} | |
Person.prototype = obj6; | |
print("Assigning a deoptimized object to a function .prototype | ", format(%HasFastProperties(obj6))); | |
//If that returns true then the above prototype assignment | |
//can be considered same as calling %ToFastProperties(obj6) | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//d8 is a few weeks old bleeding edge | |
$ d8 --allow-natives-syntax prop_heuristics.js | |
Frozen | Optimized fast properties | |
Sealed | Hash table slowness | |
Extensions prevented | Optimized fast properties | |
Non identifier keys | Hash table slowness | |
Identifier keys | Optimized fast properties | |
Deleting a property | Hash table slowness | |
Null proto | Optimized fast properties | |
accessor function syntactically | Optimized fast properties | |
accessor function dynamically with configured meta props | Optimized fast properties | |
67 out of object static properties | Hash table slowness | |
66 out of object static properties | Optimized fast properties | |
16 out of object dynamic properties | Hash table slowness | |
15 out of object dynamic properties | Optimized fast properties | |
256 in object properties | Optimized fast properties | |
1030 in object properties | Hash table slowness | |
Change property form writable to unwritable | Hash table slowness | |
Assigning a deoptimized object to a function .prototype | Optimized fast properties |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment