BT /F42 8.9664 Tf 166.5633 713.0262 Td[(Loops)-1333(T)35(rees)-1334(T)35(races)-1333(Aborts)-1333(Flushes)-1334(T)35(re)1(es/Loop)-1334(T)35(races/T)35(ree)-1333(T)35(races/Loop)-1333(Speedup)]TJ ET 1 0 0 1 65.4416 709.6388 cm q []0 d 0 J 0.3985 w 0 0.1992 m 479.2339 0.1992 l S Q 1 0 0 1 -65.4416 -709.6388 cm BT /F42 8.9664 Tf 71.4192 702.665 Td[(3d-cube)-8890(25)-2519(27)-2964(29)-3555(3)-3889(0)-4659(1.1)-4788(1.1)-5102(1.2)-2527(2.20x)]TJ 0 -9.9626 Td[(3d-morph)-8667(5)-3019(8)-3464(8)-3555(2)-3889(0)-4659(1.6)-4788(1.0)-5102(1.6)-2527(2.86x)]TJ 0 -9.9627 Td[(3d-raytrace)-7558(10)-2519(25)-2464(100)-3055(10)-3889(1)-4659(2.5)-4788(4.0)-4602(10.0)-2527(1.18x)]TJ 0 -9.9626 Td[(access-binary-trees)-4948(0)-3019(0)-3464(0)-3555(5)-3889(0)-5576(-)-5705(-)-6019(-)-2527(0.93x)]TJ 0 -9.9626 Td[(access-f)10(annkuch)-5513(10)-2519(34)-2964(57)-3055(24)-3889(0)-4659(3.4)-4788(1.7)-5102(5.7)-2527(2.20x)]TJ 0 -9.9627 Td[(access-nbody)-7224(8)-2519(16)-2964(18)-3555(5)-3889(0)-4659(2.0)-4788(1.1)-5102(2.3)-2527(4.19x)]TJ 0 -9.9626 Td[(access-nsie)25(v)15(e)-7209(3)-3019(6)-3464(8)-3555(3)-3889(0)-4659(2.0)-4788(1.3)-5102(2.7)-2527(3.05x)]TJ 0 -9.9627 Td[(bitops-3bit-bits-in-byte)-3333(2)-3019(2)-3464(2)-3555(0)-3889(0)-4659(1.0)-4788(1.0)-5102(1.0)-2028(25.47x)]TJ 0 -9.9626 Td[(bitops-bits-in-byte)-5222(3)-3019(3)-3464(4)-3555(1)-3889(0)-4659(1.0)-4788(1.3)-5102(1.3)-2528(8.67x)]TJ 0 -9.9626 Td[(bitops-bitwise-and)-5167(1)-3019(1)-3464(1)-3555(0)-3889(0)-4659(1.0)-4788(1.0)-5102(1.0)-2028(25.20x)]TJ 0 -9.9627 Td[(bitops-nsie)25(v)15(e-bits)-5540(3)-3019(3)-3464(5)-3555(0)-3889(0)-4659(1.0)-4788(1.7)-5102(1.7)-2528(2.75x)]TJ 0 -9.9626 Td[(control\003o)25(w-recursi)25(v)15(e)-4067(0)-3019(0)-3464(0)-3555(1)-3889(0)-5576(-)-5705(-)-6019(-)-2528(0.98x)]TJ 0 -9.9627 Td[(crypto-aes)-7946(50)-2519(72)-2964(78)-3055(19)-3889(0)-4659(1.4)-4788(1.1)-5102(1.6)-2527(1.64x)]TJ 0 -9.9626 Td[(crypto-md5)-7945(4)-3019(4)-3464(5)-3555(0)-3889(0)-4659(1.0)-4788(1.3)-5102(1.3)-2527(2.30x)]TJ 0 -9.9626 Td[(crypto-sha1)-7890(5)-3019(5)-2964(10)-3555(0)-3889(0)-4659(1.0)-4788(2.0)-5102(2.0)-2527(5.95x)]TJ 0 -9.9627 Td[(date-format-tofte)-5780(3)-3019(3)-3464(4)-3555(7)-3889(0)-4659(1.0)-4788(1.3)-5102(1.3)-2527(1.07x)]TJ 0 -9.9626 Td[(date-format-xparb)-5336(3)-3019(3)-2964(11)-3555(3)-3889(0)-4659(1.0)-4788(3.7)-5102(3.7)-2527(0.98x)]TJ 0 -9.9627 Td[(math-cordic)-7779(2)-3019(4)-3464(5)-3555(1)-3889(0)-4659(2.0)-4788(1.3)-5102(2.5)-2527(4.92x)]TJ 0 -9.9626 Td[(math-partial-sums)-5334(2)-3019(4)-3464(4)-3555(1)-3889(0)-4659(2.0)-4788(1.0)-5102(2.0)-2528(5.90x)]TJ 0 -9.9626 Td[(math-spectral-norm)-4224(15)-2519(20)-2964(20)-3555(0)-3889(0)-4659(1.3)-4788(1.0)-5102(1.3)-2528(7.12x)]TJ 0 -9.9627 Td[(re)15(ge)15(xp-dna)-8143(2)-3019(2)-3464(2)-3555(0)-3889(0)-4659(1.0)-4788(1.0)-5102(1.0)-2527(4.21x)]TJ 0 -9.9626 Td[(string-base64)-7223(3)-3019(5)-3464(7)-3555(0)-3889(0)-4659(1.7)-4788(1.4)-5102(2.3)-2527(2.53x)]TJ 0 -9.9627 Td[(string-f)10(asta)-8122(5)-2519(11)-2964(15)-3555(6)-3889(0)-4659(2.2)-4788(1.4)-5102(3.0)-2527(1.49x)]TJ 0 -9.9626 Td[(string-tagcloud)-6556(3)-3019(6)-3464(6)-3555(5)-3889(0)-4659(2.0)-4788(1.0)-5102(2.0)-2527(1.09x)]TJ 0 -9.9626 Td[(string-unpack-code)-4891(4)-3019(4)-2964(37)-3555(0)-3889(0)-4659(1.0)-4788(9.3)-5102(9.3)-2527(1.20x)]TJ 0 -9.9627 Td[(string-v)25(alidate-input)-4470(6)-2519(10)-2964(13)-3555(1)-3889(0)-4659(1.7)-4788(1.3)-5102(2.2)-2528(1.86x)]TJ ET 1 0 0 1 54 439.3225 cm q []0 d 0 J 0.3288 w 0 0.1644 m 502.1171 0.1644 l S Q 1 0 0 1 -54 -439.3225 cm BT /F41 8.9664 Tf 161.4547 429.1597 Td[(Figur)18(e)-250(13.)]TJ/F42 8.9664 Tf 43.1729 0 Td[(Detailed)-250(trace)-250(recording)-250(statistics)-250(for)-250(the)-250(SunSpider)-250(benchmark)-250(set.)]TJ -150.6276 -29.8366 Td[(mean\051.)-315(W)80(e)-316(e)15(xclude)]TJ/F33 8.9664 Tf 72.6115 0 Td[(regexp-dna)]TJ/F42 8.9664 Tf 49.9011 0 Td[(from)-315(the)-316(follo)25(wing)-315(calculations,)]TJ -122.5126 -9.9626 Td[(because)-247(most)-246(of)-247(its)-246(time)-247(is)-247(spent)-246(in)-247(the)-247(r)1(e)15(gular)-247(e)15(xpression)-247(matcher)40(,)]TJ 0 -9.9626 Td[(which)-473(has)-473(much)-473(dif)25(ferent)-473(performance)-473(characteristics)-473(from)-473(the)]TJ 0 -9.9627 Td[(other)-351(programs.)-352(\050Note)-351(that)-351(this)-351(only)-352(mak)10(es)-351(a)-351(dif)25(ference)-351(of)-352(about)]TJ 0 -9.9626 Td[(10%)-286(in)-287(the)-286(results.\051)-286(Di)25(viding)-286(the)-287(total)-286(e)15(x)15(ecution)-286(time)-286(in)-287(processor)]TJ 0 -9.9627 Td[(clock)-461(c)15(ycles)-460(by)-461(the)-461(number)-460(of)-461(bytecodes)-461(e)15(x)15(ecuted)-460(in)-461(the)-461(base)]TJ 0 -9.9626 Td[(interpreter)-415(sho)25(ws)-415(that)-415(on)-415(a)20(v)15(erage,)-415(a)-415(bytecode)-416(e)15(x)15(ecute)1(s)-416(in)-415(about)]TJ 0 -9.9626 Td[(35)-344(c)15(ycles.)-344(Nati)25(v)15(e)-343(traces)-344(tak)10(e)-344(about)-344(9)-344(c)15(ycle)1(s)-344(per)-344(bytecode,)-344(a)-344(3.9x)]TJ 0 -9.9627 Td[(speedup)-250(o)15(v)15(er)-250(the)-250(interpreter)55(.)]TJ 11.9552 -9.9626 Td[(Using)-311(similar)-310(computations,)-311(we)-311(\002nd)-310(that)-311(trace)-311(recording)-310(tak)10(es)]TJ -11.9552 -9.9627 Td[(about)-316(3800)-315(c)15(ycles)-316(per)-316(bytecode,)-315(and)-316(compilation)-315(3150)-316(c)15(ycles)-316(per)]TJ 0 -9.9626 Td[(bytecode.)-309(Hence,)-309(during)-310(recording)-309(and)-309(compiling)-309(the)-309(VM)-309(runs)-310(at)]TJ 0 -9.9626 Td[(1/200)-302(the)-303(s)1(peed)-303(of)-302(the)-302(interpreter)55(.)-302(Because)-303(it)-302(costs)-302(6950)-302(c)15(ycles)-303(to)]TJ 0 -9.9627 Td[(compile)-303(a)-304(bytecode,)-303(and)-303(we)-304(sa)20(v)15(e)-303(26)-303(c)15(ycles)-303(each)-304(time)-303(that)-303(code)-304(is)]TJ 0 -9.9626 Td[(run)-250(nati)25(v)15(ely)65(,)-250(we)-250(break)-250(e)25(v)15(en)-250(after)-250(running)-250(a)-250(trace)-250(270)-250(times.)]TJ 11.9552 -9.9627 Td[(The)-317(other)-317(VMs)-317(we)-318(compared)-317(with)-317(achie)25(v)15(e)-317(an)-317(o)15(v)15(erall)-317(speedup)]TJ -11.9552 -9.9626 Td[(of)-398(3.0x)-399(relati)25(v)15(e)-398(to)-398(our)-399(baseline)-398(interpreter)55(.)-398(Our)-398(estimated)-399(nati)25(v)15(e)]TJ 0 -9.9626 Td[(code)-463(speedup)-463(of)-463(3.9x)-463(is)-463(signi\002cantly)-463(better)55(.)-464(This)-463(suggests)-463(that)]TJ 0 -9.9627 Td[(our)-238(compilation)-238(techniques)-238(can)-238(generate)-238(more)-239(ef)25(\002)1(cient)-239(nati)25(v)15(e)-238(code)]TJ 0 -9.9626 Td[(than)-250(an)15(y)-250(other)-250(current)-250(Ja)20(v)25(aScript)-250(VM.)]TJ 11.9552 -9.9627 Td[(These)-202(estimates)-202(also)-202(indicate)-202(that)-202(our)-202(startup)-202(performance)-202(could)]TJ -11.9552 -9.9626 Td[(be)-270(substantially)-270(better)-271(if)-270(we)-270(impro)15(v)15(ed)-271(the)-270(speed)-270(of)-270(trace)-271(recording)]TJ 0 -9.9626 Td[(and)-288(compilation.)-288(The)-288(estimated)-288(200x)-288(slo)25(wdo)25(wn)-288(for)-288(recording)-288(and)]TJ 0 -9.9627 Td[(compilation)-217(is)-216(v)14(e)1(ry)-217(rough,)-217(and)-217(may)-217(be)-216(in\003uenced)-217(by)-217(startup)-217(f)10(actors)]TJ 0 -9.9626 Td[(in)-285(the)-285(interpreter)-285(\050e.g.,)-285(caches)-285(that)-285(ha)20(v)15(e)-285(not)-285(w)10(armed)-285(up)-285(yet)-285(during)]TJ 0 -9.9627 Td[(recording\051.)-389(One)-389(observ)25(ation)-389(supporting)-389(this)-389(conjecture)-389(is)-389(that)-389(in)]TJ 0 -9.9626 Td[(the)-249(tracer)40(,)-248(interpreted)-249(bytecodes)-249(tak)10(e)-248(about)-249(180)-249(c)15(ycles)-248(to)-249(run.)-249(Still,)]TJ 0 -9.9626 Td[(recording)-282(and)-281(compilation)-282(are)-281(clearly)-282(both)-281(e)15(xpensi)25(v)15(e,)-282(and)-281(a)-282(better)]TJ 0 -9.9627 Td[(implementation,)-409(possibly)-409(including)-409(redesign)-409(of)-409(the)-409(LIR)-409(abstract)]TJ 0 -9.9626 Td[(syntax)-250(or)-250(encoding,)-250(w)10(ould)-250(impro)15(v)15(e)-250(startup)-250(performance.)]TJ 11.9552 -9.9627 Td[(Our)-302(performance)-302(results)-303(con\002rm)-302(that)-302(type)-302(specialization)-302(using)]TJ -11.9552 -9.9626 Td[(trace)-476(trees)-477(substantially)-476(impro)15(v)15(es)-477(performance.)-476(W)80(e)-477(are)-476(able)-477(to)]TJ 0 -9.9626 Td[(outperform)-326(the)-325(f)10(astest)-326(a)20(v)25(ailable)-326(Ja)20(v)25(aScript)-326(com)1(piler)-326(\050V8\051)-326(and)-326(the)]TJ 263.0137 318.8045 Td[(f)10(astest)-319(a)20(v)25(ailable)-318(Ja)20(v)25(aScript)-319(inline)-319(threaded)-319(interpret)1(er)-319(\050SFX\051)-319(on)-319(9)]TJ 0 -9.9627 Td[(of)-250(26)-250(benchmarks.)]TJ/F41 10.9589 Tf 0 -37.9782 Td[(8.)-1000(Related)-250(W)75(ork)]TJ/F41 8.9664 Tf 0 -13.9477 Td[(T)74(race)-336(optimization)-335(f)25(or)-336(dynamic)-336(languages.)]TJ/F42 8.9664 Tf 169.3258 0 Td[(The)-336(closest)-335(area)-336(of)]TJ -169.3258 -9.9626 Td[(related)-370(w)10(ork)-370(is)-370(on)-369(applying)-370(trace)-370(optimization)-370(to)-370(type-specialize)]TJ 0 -9.9627 Td[(dynamic)-394(languages.)-394(Existing)-395(w)10(ork)-394(shares)-394(the)-394(idea)-394(of)-395(generating)]TJ 0 -9.9626 Td[(type-specialized)-369(code)-369(speculat)1(i)25(v)15(ely)-369(with)-369(guards)-369(along)-369(interpreter)]TJ 0 -9.9627 Td[(traces.)]TJ 11.9552 -9.9626 Td[(T)80(o)-459(our)-460(kno)25(wledge,)-459(Rigo')55(s)-459(Psyco)-459(\05016\051)-460(is)-459(the)-459(only)-459(published)]TJ -11.9552 -9.9626 Td[(type-specializing)-275(trace)-274(compiler)-275(for)-275(a)-274(dynamic)-275(language)-275(\050Python\051.)]TJ 0 -9.9627 Td[(Psyco)-210(does)-209(not)-210(attempt)-209(to)-210(identify)-210(hot)-209(loops)-210(or)-210(inl)1(ine)-210(function)-210(calls.)]TJ 0 -9.9626 Td[(Instead,)-219(Psyco)-219(transforms)-220(loops)-219(to)-219(mutual)-219(recursion)-219(before)-220(running)]TJ 0 -9.9627 Td[(and)-250(traces)-250(all)-250(operations.)]TJ 11.9552 -9.9626 Td[(P)15(all')55(s)-258(LuaJIT)-258(is)-258(a)-257(Lua)-258(VM)-258(in)-258(de)25(v)15(elopment)-258(that)-258(uses)-258(tra)1(ce)-258(com-)]TJ -11.9552 -9.9626 Td[(pilation)-230(ideas.)-229(\0501\051.)-230(There)-229(are)-230(no)-230(publications)-229(on)-230(LuaJIT)-229(b)20(ut)-230(the)-230(cre-)]TJ 0 -9.9627 Td[(ator)-260(has)-260(told)-261(us)-260(that)-260(LuaJIT)-260(has)-260(a)-261(similar)-260(design)-260(to)-260(our)-260(system,)-261(b)20(ut)]TJ 0 -9.9626 Td[(will)-335(use)-335(a)-335(less)-334(aggressi)25(v)15(e)-335(type)-335(speculation)-335(\050e.g.,)-335(using)-335(a)-335(\003oating-)]TJ 0 -9.9627 Td[(point)-324(representation)-325(for)-324(all)-325(number)-324(v)25(alues\051)-324(and)-325(does)-324(not)-325(generate)]TJ 0 -9.9626 Td[(nested)-250(traces)-250(for)-250(nested)-250(loops.)]TJ/F41 8.9664 Tf 11.9552 -9.9626 Td[(General)-431(trace)-432(optimization.)]TJ/F42 8.9664 Tf 112.4579 0 Td[(General)-431(trace)-432(optimization)-431(has)]TJ -124.4131 -9.9627 Td[(a)-465(longer)-466(history)-465(that)-466(has)-465(treated)-466(mostly)-465(nati)25(v)15(e)-466(code)-465(and)-466(typed)]TJ 0 -9.9626 Td[(languages)-254(lik)10(e)-254(Ja)20(v)25(a.)-254(Thus,)-253(these)-254(systems)-254(ha)20(v)15(e)-254(focused)-254(less)-254(on)-254(type)]TJ 0 -9.9627 Td[(specialization)-250(and)-250(more)-250(on)-250(other)-250(optimizations.)]TJ 11.9552 -9.9626 Td[(Dynamo)-325(\0507\051)-325(by)-325(Bala)-324(et)-325(al,)-325(introduced)-325(nati)25(v)15(e)-325(code)-325(tracing)-324(as)-325(a)]TJ -11.9552 -9.9626 Td[(replacement)-314(for)-314(pro\002le-guided)-314(optimization)-314(\050PGO\051.)-314(A)-315(major)-314(goal)]TJ 0 -9.9627 Td[(w)10(as)-457(to)-456(perform)-457(PGO)-456(online)-457(so)-457(that)-456(the)-457(pro\002le)-456(w)10(as)-457(speci\002c)-457(to)]TJ 0 -9.9626 Td[(the)-273(current)-272(e)15(x)15(ecution.)-273(Dynamo)-272(used)-273(loop)-272(headers)-273(as)-272(candidate)-273(hot)]TJ 0 -9.9627 Td[(traces,)-250(b)20(ut)-250(did)-250(not)-250(try)-250(to)-250(create)-250(loop)-250(traces)-250(speci\002cally)65(.)]TJ 11.9552 -9.9626 Td[(T)35(race)-355(trees)-354(were)-355(originally)-355(proposed)-355(by)-355(Gal)-354(et)-355(al.)-355(\05011\051)-355(in)-354(the)]TJ -11.9552 -9.9626 Td[(conte)15(xt)-357(of)-357(Ja)20(v)25(a,)-356(a)-357(statically)-357(typed)-357(language.)-356(Their)-357(trace)-357(trees)-357(ac-)]TJ 0 -9.9627 Td[(tually)-311(inlined)-312(parts)-311(of)-311(outer)-312(loops)-311(within)-312(the)-311(inner)-311(loops)-312(\050because)]TJ ET