1 0 0 1 138.0918 452.7684 cm q 0.97 0 0 0.97 0 0 cm q 1 0 0 1 -104.7432 -498.0109 cm /Im6 Do Q Q 1 0 0 1 -84.0918 -11.2877 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 -441.4807 cm BT /F41 8.9664 Tf 54 431.3179 Td[(Figur)18(e)-311(10.)]TJ/F42 8.9664 Tf 43.7208 0 Td[(Speedup)-311(vs.)-311(a)-311(baseline)-311(Ja)20(v)25(aScript)-311(interpreter)-311(\050SpiderMonk)10(e)15(y\051)-311(for)-312(our)-311(trace-based)-311(JIT)-311(compiler)40(,)-311(Apple')55(s)-311(SquirrelFish)-311(Extreme)]TJ -43.7208 -9.9627 Td[(inline)-205(threading)-205(interpreter)-205(and)-205(Google')55(s)-205(V8)-205(JS)-205(compiler)55(.)-205(Our)-205(system)-205(generates)-205(particularly)-205(ef)25(\002cient)-205(code)-205(for)-205(programs)-205(that)-205(bene\002t)-205(most)-205(from)]TJ 0 -9.9626 Td[(type)-269(specialization,)-270(which)-269(includes)-269(SunSpider)-270(Benchmark)-269(programs)-270(that)-269(perform)-269(bit)-270(manipulation.)-269(W)80(e)-270(type-s)1(pecialize)-270(the)-269(code)-270(in)-269(question)]TJ 0 -9.9626 Td[(to)-313(use)-313(inte)15(ger)-313(arithmet)1(ic,)-313(which)-313(substantially)-313(impro)15(v)15(es)-313(performance.)-313(F)15(or)-313(one)-312(of)-313(the)-313(benchmark)-313(programs)-313(we)-313(e)15(x)15(ecute)-312(25)-313(times)-313(f)10(aster)-313(than)]TJ 0 -9.9627 Td[(the)-250(SpiderMonk)10(e)15(y)-251(interpre)1(ter)40(,)-251(and)-250(almost)-250(5)-251(times)-250(f)10(aster)-250(than)-250(V8)-251(and)-250(SFX.)-250(F)15(or)-251(a)-250(lar)18(ge)-250(number)-250(of)-251(benchmarks)-250(all)-250(three)-250(VMs)-251(produce)-250(similar)]TJ 0 -9.9626 Td[(results.)-249(W)80(e)-250(perform)-249(w)10(orst)-249(on)-250(benchmark)-249(programs)-249(that)-250(we)-249(do)-249(not)-250(trace)-249(and)-249(instead)-250(f)10(a)1(ll)-250(back)-249(onto)-249(the)-250(interpreter)55(.)-249(This)-249(includes)-250(the)-249(recursi)25(v)15(e)]TJ 0 -9.9627 Td[(benchmarks)]TJ/F33 8.9664 Tf 45.5667 0 Td[(access-binary-trees)]TJ/F42 8.9664 Tf 91.6802 0 Td[(and)]TJ/F33 8.9664 Tf 15.189 0 Td[(control-flow-recursive)]TJ/F42 8.9664 Tf 103.5604 0 Td[(,)-250(for)-250(which)-250(we)-250(currently)-250(don')18(t)-250(generate)-250(an)15(y)-250(nati)25(v)15(e)-250(code.)]TJ -255.9963 -29.8879 Td[(In)-278(particular)40(,)-277(the)]TJ/F33 8.9664 Tf 62.1391 0 Td[(bitops)]TJ/F42 8.9664 Tf 30.7344 0 Td[(benchmarks)-278(are)-277(short)-278(programs)-278(that)-278(per)20(-)]TJ -92.8735 -9.9626 Td[(form)-299(man)15(y)-300(bitwise)-299(operations,)-300(so)-299(T)35(raceMonk)10(e)15(y)-299(can)-300(co)15(v)15(er)-299(the)-300(en-)]TJ 0 -9.9627 Td[(tire)-245(program)-245(with)-245(1)-245(or)-245(2)-245(traces)-245(that)-246(opera)1(te)-246(on)-245(inte)15(gers.)-245(T)35(raceMon-)]TJ 0 -9.9626 Td[(k)10(e)15(y)-265(runs)-265(all)-265(the)-265(other)-265(progr)1(ams)-265(in)-265(this)-265(set)-265(almost)-265(entirely)-265(as)-265(nati)25(v)15(e)]TJ 0 -9.9627 Td[(code.)]TJ/F33 8.9664 Tf 11.9552 -9.9626 Td[(regexp-dna)]TJ/F42 8.9664 Tf 51.7706 0 Td[(is)-524(dominated)-524(by)-524(re)15(gular)-524(e)15(xpression)-524(ma)1(tching,)]TJ -63.7258 -9.9626 Td[(which)-251(is)-250(implemented)-251(in)-250(all)-251(3)-250(VMs)-251(by)-250(a)-251(special)-250(re)15(gular)-251(e)15(xpression)]TJ 0 -9.9627 Td[(compiler)55(.)-313(Thus,)-313(performance)-313(on)-313(this)-313(benchmark)-313(has)-313(little)-313(relation)]TJ 0 -9.9626 Td[(to)-250(the)-250(trace)-250(compilation)-250(approach)-250(discussed)-250(in)-250(this)-250(paper)55(.)]TJ 11.9552 -9.9627 Td[(T)35(raceMonk)10(e)15(y')55(s)-287(smaller)-287(speedups)-288(on)-287(the)-287(other)-287(benchmarks)-287(can)]TJ -11.9552 -9.9626 Td[(be)-250(attrib)20(uted)-250(to)-250(a)-250(fe)25(w)-250(speci\002c)-250(causes:)]TJ/F26 7.9701 Tf 5.2303 -25.2391 Td[(\017)]TJ/F42 8.9664 Tf 7.7211 -0.8982 Td[(The)-552(implementation)-552(does)-553(not)-552(currently)-552(trace)-552(recursion,)-552(so)]TJ 0 -9.9626 Td[(T)35(raceMonk)10(e)15(y)-534(achie)25(v)15(es)-534(a)-534(small)-534(speedup)-534(or)-534(no)-534(speedup)-534(on)]TJ 0 -9.9627 Td[(benchmarks)-593(that)-593(use)-593(recursion)-593(e)15(xtensi)25(v)15(ely:)]TJ/F33 8.9664 Tf 171.5197 0 Td[(3d-cube)]TJ/F42 8.9664 Tf 32.951 0 Td[(,)]TJ/F33 8.9664 Tf 7.5594 0 Td[(3d-)]TJ -212.0301 -9.9626 Td[(raytrace)]TJ/F42 8.9664 Tf 37.6584 0 Td[(,)]TJ/F33 8.9664 Tf 5.1661 0 Td[(access-binary-trees)]TJ/F42 8.9664 Tf 89.4385 0 Td[(,)]TJ/F33 8.9664 Tf 5.1661 0 Td[(string-tagcloud)]TJ/F42 8.9664 Tf 70.6094 0 Td[(,)-326(and)]TJ/F33 8.9664 Tf -208.0385 -9.9627 Td[(controlflow-recursive)]TJ/F42 8.9664 Tf 98.8532 0 Td[(.)]TJ/F26 7.9701 Tf -106.5743 -13.0495 Td[(\017)]TJ/F42 8.9664 Tf 7.7211 -0.8982 Td[(The)-384(implementation)-384(does)-383(not)-384(currently)-384(trace)]TJ/F33 8.9664 Tf 168.5649 0 Td[(eval)]TJ/F42 8.9664 Tf 22.2705 0 Td[(and)-384(some)]TJ -190.8354 -9.9626 Td[(other)-483(functions)-482(implemented)-483(in)-483(C.)-483(Because)]TJ/F33 8.9664 Tf 169.6644 0 Td[(date-format-)]TJ -169.6644 -9.9626 Td[(tofte)]TJ/F42 8.9664 Tf 27.0327 0 Td[(and)]TJ/F33 8.9664 Tf 16.4436 0 Td[(date-format-xparb)]TJ/F42 8.9664 Tf 83.5202 0 Td[(use)-390(such)-390(functions)-390(in)-390(their)]TJ -126.9965 -9.9627 Td[(main)-250(loops,)-250(we)-250(do)-250(not)-250(trace)-250(them.)]TJ/F26 7.9701 Tf -7.7211 -13.0495 Td[(\017)]TJ/F42 8.9664 Tf 7.7211 -0.8982 Td[(The)-400(implementation)-399(does)-400(not)-399(currently)-400(trace)-400(through)-399(re)15(gular)]TJ 0 -9.9626 Td[(e)15(xpression)]TJ/F33 8.9664 Tf 41.7528 0 Td[(replace)]TJ/F42 8.9664 Tf 36.4895 0 Td[(operations.)-395(The)-394(replace)-395(function)-394(can)-395(be)]TJ -78.2423 -9.9627 Td[(passed)-271(a)-270(function)-271(object)-271(used)-270(to)-271(compute)-271(the)-271(replacement)-270(te)15(xt.)]TJ 0 -9.9626 Td[(Our)-374(implementation)-373(currently)-374(does)-373(not)-374(trace)-374(functions)-373(called)]TJ 0 -9.9626 Td[(as)-239(replace)-240(functions.)-239(The)-239(run)-239(time)-240(of)]TJ/F33 8.9664 Tf 133.2945 0 Td[(string-unpack-code)]TJ/F42 8.9664 Tf 86.877 0 Td[(is)]TJ -220.1715 -9.9627 Td[(dominated)-250(by)-250(such)-250(a)]TJ/F33 8.9664 Tf 76.2046 0 Td[(replace)]TJ/F42 8.9664 Tf 35.1927 0 Td[(call.)]TJ/F26 7.9701 Tf 143.8953 274.109 Td[(\017)]TJ/F42 8.9664 Tf 7.7211 -0.8982 Td[(T)80(w)10(o)-405(programs)-406(trace)-405(well,)-405(b)20(ut)-406(ha)20(v)15(e)-405(a)-406(long)-405(compilation)-405(time.)]TJ/F33 8.9664 Tf 0 -9.9626 Td[(access-nbody)]TJ/F42 8.9664 Tf 58.1911 0 Td[(forms)-190(a)-190(lar)18(ge)-190(number)-190(of)-190(traces)-190(\05081\051.)]TJ/F33 8.9664 Tf 127.5367 0 Td[(crypto-md5)]TJ/F42 8.9664 Tf -185.7278 -9.9627 Td[(forms)-297(one)-297(v)14(e)1(ry)-298(long)-297(trace.)-297(W)80(e)-298(e)15(xpec)1(t)-298(to)-297(impro)15(v)15(e)-297(performance)]TJ 0 -9.9626 Td[(on)-273(this)-274(programs)-273(by)-274(impro)15(ving)-273(the)-274(compilation)-273(speed)-274(of)-273(nano-)]TJ 0 -9.9626 Td[(jit.)]TJ/F26 7.9701 Tf -7.7211 -13.0495 Td[(\017)]TJ/F42 8.9664 Tf 7.7211 -0.8982 Td[(Some)-450(programs)-450(trace)-449(v)15(ery)-450(well,)-450(and)-450(speed)-450(up)-449(compared)-450(to)]TJ 0 -9.9626 Td[(the)-360(interpreter)40(,)-361(b)20(ut)-360(are)-360(not)-361(as)-360(f)10(ast)-360(as)-360(SFX)-361(and/or)-360(V8,)-360(namely)]TJ/F33 8.9664 Tf 0 -9.9627 Td[(bitops-bits-in-byte)]TJ/F42 8.9664 Tf 89.4386 0 Td[(,)]TJ/F33 8.9664 Tf 9.5155 0 Td[(bitops-nsieve-bits)]TJ/F42 8.9664 Tf 84.7313 0 Td[(,)]TJ/F33 8.9664 Tf 9.5155 0 Td[(access-)]TJ -193.2009 -9.9626 Td[(fannkuch)]TJ/F42 8.9664 Tf 37.6584 0 Td[(,)]TJ/F33 8.9664 Tf 5.113 0 Td[(access-nsieve)]TJ/F42 8.9664 Tf 61.1948 0 Td[(,)-320(and)]TJ/F33 8.9664 Tf 20.9319 0 Td[(crypto-aes)]TJ/F42 8.9664 Tf 47.0729 0 Td[(.)-320(The)-320(reason)-321(is)]TJ -171.971 -9.9627 Td[(not)-452(clear)40(,)-451(b)20(ut)-452(all)-451(of)-452(these)-451(programs)-452(ha)20(v)15(e)-451(nested)-452(loops)-451(with)]TJ 0 -9.9626 Td[(small)-259(bodies,)-258(so)-259(we)-259(suspec)1(t)-259(that)-259(the)-258(implementation)-259(has)-259(a)-258(rela-)]TJ 0 -9.9626 Td[(ti)25(v)15(ely)-242(high)-243(cost)-242(for)-242(calling)-242(nested)-243(traces.)]TJ/F33 8.9664 Tf 146.5825 0 Td[(string-fasta)]TJ/F42 8.9664 Tf 58.6602 0 Td[(traces)]TJ -205.2427 -9.9627 Td[(well,)-226(b)20(ut)-226(its)-226(run)-227(time)-226(is)-226(dominated)-226(by)-226(string)-226(processing)-226(b)20(uiltins,)]TJ 0 -9.9626 Td[(which)-258(are)-257(unaf)25(fected)-258(by)-258(tracing)-257(and)-258(seem)-258(to)-257(be)-258(less)-258(ef)25(\002cient)-257(in)]TJ 0 -9.9627 Td[(SpiderMonk)10(e)15(y)-250(than)-250(in)-250(the)-250(tw)10(o)-250(other)-250(VMs.)]TJ/F41 8.9664 Tf -0.9963 -20.1597 Td[(Detailed)-232(perf)25(ormance)-231(metrics.)]TJ/F42 8.9664 Tf 117.8007 0 Td[(In)-232(Figure)-231(11)-232(we)-232(sho)25(w)-232(the)-231(frac-)]TJ -129.7558 -9.9626 Td[(tion)-257(of)-257(instructions)-257(interprete)1(d)-257(and)-257(the)-257(fraction)-257(of)-257(instructions)-257(e)15(x)15(e-)]TJ 0 -9.9627 Td[(cuted)-225(as)-225(nati)25(v)15(e)-225(code.)-225(This)-224(\002gure)-225(sho)25(ws)-225(that)-225(for)-225(man)15(y)-225(programs,)-225(we)]TJ 0 -9.9626 Td[(are)-250(able)-250(to)-250(e)15(x)15(ecute)-250(almost)-250(all)-250(the)-250(code)-250(nati)25(v)15(ely)65(.)]TJ 11.9551 -9.9627 Td[(Figure)-281(12)-280(breaks)-281(do)25(wn)-280(the)-281(total)-280(e)15(x)15(ecution)-281(time)-280(into)-281(four)-280(acti)25(v-)]TJ -11.9551 -9.9626 Td[(ities:)-330(interpreting)-330(bytecodes)-330(while)-330(not)-330(recording,)-331(recording)-330(traces)]TJ 0 -9.9626 Td[(\050including)-394(time)-394(tak)10(en)-395(to)-394(interpret)-394(the)-394(recorded)-394(trace\051,)-395(compiling)]TJ 0 -9.9627 Td[(traces)-250(to)-250(nati)25(v)15(e)-250(code,)-250(and)-250(e)15(x)15(ecuting)-250(nati)25(v)15(e)-250(code)-250(traces.)]TJ 11.9551 -9.9626 Td[(These)-405(detailed)-404(metrics)-405(allo)25(w)-404(us)-405(to)-405(estimate)-404(parameters)-405(for)-404(a)]TJ -11.9551 -9.9627 Td[(simple)-358(model)-358(of)-359(tracing)-358(performance.)-358(These)-358(estimates)-358(should)-359(be)]TJ 0 -9.9626 Td[(considered)-395(v)15(ery)-395(rough,)-396(as)-395(the)-395(v)25(alues)-395(observ)15(ed)-395(on)-396(the)-395(indi)25(vidual)]TJ 0 -9.9626 Td[(benchmarks)-423(ha)20(v)15(e)-423(lar)18(ge)-423(standard)-423(de)25(viations)-423(\050on)-423(the)-423(order)-423(of)-423(the)]TJ ET