Skip to content

Instantly share code, notes, and snippets.

@HParker
Created October 17, 2022 19:37
Show Gist options
  • Save HParker/65c9ada9614301526a182b58be4f86fd to your computer and use it in GitHub Desktop.
Save HParker/65c9ada9614301526a182b58be4f86fd to your computer and use it in GitHub Desktop.
Common instruction sequences from rails_bench

results (11455261) instructions captured

==== top ====

getlocal_WC_0 = 1903656
opt_send_without_block = 1638356
leave = 1057370
putself = 729499
branchunless = 626085
putobject = 584513
setlocal_WC_0 = 502096
getinstancevariable = 434992
pop = 407503
dup = 375151
branchif = 356332
opt_getconstant_path = 346475
getlocal_WC_1 = 293899
opt_aref = 252054
putnil = 202523
send = 183597
topn = 117833
anytostring = 99570
objtostring = 99562
nop = 94002
jump = 85400
opt_empty_p = 79983
opt_aset = 79587
invokesuper = 77297
setinstancevariable = 73210

==== 2 chains ====

chain ["getlocal_WC_0", "opt_send_without_block"] = 589773
chain ["leave", "leave"] = 337408
chain ["putself", "opt_send_without_block"] = 325720
chain ["setlocal_WC_0", "getlocal_WC_0"] = 255821
chain ["branchunless", "getlocal_WC_0"] = 239363
chain ["putself", "getlocal_WC_0"] = 234240
chain ["opt_send_without_block", "putself"] = 218171
chain ["getlocal_WC_0", "getlocal_WC_0"] = 215772
chain ["getlocal_WC_0", "putobject"] = 215522
chain ["opt_send_without_block", "getlocal_WC_0"] = 214889
chain ["getinstancevariable", "getlocal_WC_0"] = 148413
chain ["opt_send_without_block", "getinstancevariable"] = 146600
chain ["opt_send_without_block", "branchunless"] = 141160
chain ["putobject", "opt_send_without_block"] = 135572
chain ["opt_getconstant_path", "getlocal_WC_0"] = 135407
chain ["branchif", "pop"] = 132052
chain ["getlocal_WC_0", "opt_aref"] = 129815
chain ["opt_send_without_block", "branchif"] = 129285
chain ["dup", "branchif"] = 124950
chain ["branchunless", "putself"] = 119155
chain ["topn", "opt_send_without_block"] = 117589
chain ["opt_send_without_block", "setlocal_WC_0"] = 115277
chain ["leave", "opt_send_without_block"] = 110139
chain ["opt_send_without_block", "leave"] = 109160
chain ["opt_send_without_block", "putobject"] = 107029

==== 2 stats ====

getlocal_WC_0: total = 1902897

opt_send_without_block = 589773/1902897 (0.30993427389921785)
getlocal_WC_0 = 215772/1902897 (0.11339131860526344)
putobject = 215522/1902897 (0.11325993997573174)
opt_aref = 129815/1902897 (0.06821966717063509)
dup = 98617/1902897 (0.05182466523411409)
branchunless = 84280/1902897 (0.044290363587729656)
opt_getconstant_path = 77832/1902897 (0.04090184597484783)
leave = 72863/1902897 (0.03829056433427558)
opt_nil_p = 67266/1902897 (0.03534925957631969)
send = 56822/1902897 (0.02986078594900302)
opt_empty_p = 48210/1902897 (0.025335054918894716)
getblockparamproxy = 36581/1902897 (0.01922384658759775)
getlocal_WC_1 = 33721/1902897 (0.017720875065755003)
invokesuper = 28152/1902897 (0.01479428471430666)
splatarray = 19930/1902897 (0.010473504346267822)
setinstancevariable = 18448/1902897 (0.009694691830403853)
opt_aset = 17397/1902897 (0.009142376071852549)
setn = 13063/1902897 (0.006864796150290846)
putself = 12183/1902897 (0.006402343374339231)
putnil = 8874/1902897 (0.004663415833857534)
opt_size = 8537/1902897 (0.004486317441248791)
opt_not = 8368/1902897 (0.004397505487685355)
invokeblock = 7090/1902897 (0.0037258979335192603)
opt_ltlt = 7054/1902897 (0.0037069794108666944)
newarray = 6744/1902897 (0.0035440699102473753)
getlocal = 5886/1902897 (0.003093178453694551)
branchif = 3943/1902897 (0.0020721037449741107)
getinstancevariable = 1876/1902897 (0.0009858652360059425)
putobject_INT2FIX_0_ = 1558/1902897 (0.000818751619241609)
putobject_INT2FIX_1_ = 1547/1902897 (0.0008129709595422138)
dupn = 1541/1902897 (0.0008098178724334527)
opt_lt = 1126/1902897 (0.0005917293474108162)

opt_send_without_block: total = 1617830

putself = 218171/1617830 (0.13485409468238319)
getlocal_WC_0 = 214889/1617830 (0.13282545137622617)
getinstancevariable = 146600/1617830 (0.09061520678934128)
branchunless = 141160/1617830 (0.08725267796987322)
branchif = 129285/1617830 (0.07991259897517045)
setlocal_WC_0 = 115277/1617830 (0.0712540872650402)
leave = 109160/1617830 (0.06747309667888468)
putobject = 107029/1617830 (0.06615590018728791)
putnil = 84163/1617830 (0.052022153131045905)
opt_send_without_block = 75188/1617830 (0.04647459869083896)
opt_getconstant_path = 55161/1617830 (0.03409567136225685)
getlocal_WC_1 = 52022/1617830 (0.032155418059993945)
opt_invokebuiltin_delegate_leave = 40548/1617830 (0.02506320194334386)
dup = 35477/1617830 (0.021928756420637522)
opt_aref = 27753/1617830 (0.01715445998652516)
nop = 9884/1617830 (0.0061094181712540874)
opt_empty_p = 8922/1617830 (0.005514794508693744)
opt_eq = 8448/1617830 (0.005221809460820976)
invokesuper = 8269/1617830 (0.005111167427974509)
newarray = 6059/1617830 (0.0037451400950656126)
getlocal = 5747/1617830 (0.0035522891774784743)
newhash = 5332/1617830 (0.0032957727326109664)
pop = 4894/1617830 (0.003025039713690561)
getclassvariable = 1416/1617830 (0.0008752464721262431)
send = 1309/1617830 (0.0008091084971845002)
opt_not = 1282/1617830 (0.0007924194754702287)

leave: total = 1056527

leave = 337408/1056527 (0.3193557760473703)
opt_send_without_block = 110139/1056527 (0.1042462710370866)
branchunless = 95815/1056527 (0.09068864307301186)
pop = 93852/1056527 (0.08883066878555872)
setlocal_WC_0 = 82249/1056527 (0.0778484600961452)
dup = 48283/1056527 (0.04569973128940387)
nop = 31735/1056527 (0.030037093230934942)
getlocal_WC_0 = 31165/1056527 (0.02949758974451197)
branchif = 28748/1056527 (0.027209905662609665)
invokesuper = 25264/1056527 (0.02391230891401734)
jump = 23520/1056527 (0.02226161754503198)
opt_not = 20652/1056527 (0.019547063160714303)
setn = 19987/1056527 (0.018917642426554172)
getlocal_WC_1 = 19043/1056527 (0.01802414893325017)
opt_ltlt = 17021/1056527 (0.01611033130246553)
opt_empty_p = 16934/1056527 (0.016027986033485184)
putself = 12620/1056527 (0.011944796488873451)
getinstancevariable = 11805/1056527 (0.011173401153023066)
opt_aset = 8555/1056527 (0.008097284783067541)
expandarray = 6689/1056527 (0.006331120738040769)
setinstancevariable = 6388/1056527 (0.006046225037315658)
putobject = 2208/1056527 (0.002089866136880553)
send = 1394/1056527 (0.0013194172983747694)
opt_getconstant_path = 1243/1056527 (0.0011764961993399128)

putself: total = 712417

opt_send_without_block = 325720/712417 (0.45720413746443445)
getlocal_WC_0 = 234240/712417 (0.32879619660956994)
putobject = 36474/712417 (0.05119754301202807)
leave = 27573/712417 (0.0387034559815389)
putself = 21647/712417 (0.030385294006178964)
getinstancevariable = 16972/712417 (0.023823126062404464)
invokesuper = 13738/712417 (0.01928364988482869)
opt_getconstant_path = 12282/712417 (0.017239903034318382)
getlocal_WC_1 = 11875/712417 (0.016668608413330958)
putstring = 8347/712417 (0.011716452583248294)
send = 2024/712417 (0.0028410327097753143)

branchunless: total = 625924

getlocal_WC_0 = 239363/625924 (0.3824154370179127)
putself = 119155/625924 (0.19036656207462888)
opt_getconstant_path = 63460/625924 (0.10138611077383197)
pop = 62586/625924 (0.09998977511646781)
putobject = 49069/625924 (0.07839450156888057)
putnil = 35701/625924 (0.057037276091027024)
getinstancevariable = 31173/625924 (0.049803170992005416)
getlocal_WC_1 = 14921/625924 (0.023838357372460553)
newhash = 5695/625924 (0.009098548705593651)
getlocal = 3177/625924 (0.005075696090899215)

putobject: total = 575973

opt_send_without_block = 135572/575973 (0.2353790889503501)
setlocal_WC_0 = 65936/575973 (0.11447758835917655)
leave = 61562/575973 (0.10688348238545904)
getlocal_WC_0 = 58345/575973 (0.10129815112861193)
opt_eq = 49470/575973 (0.08588944273429484)
opt_aref = 39900/575973 (0.06927408055585939)
concatstrings = 25660/575973 (0.04455069942514667)
putself = 23460/575973 (0.04073107593585116)
setinstancevariable = 19638/575973 (0.034095348219447784)
putobject = 17895/575973 (0.031069164700428666)
jump = 13895/575973 (0.024124394719891383)
send = 12901/575973 (0.02239861937972787)
opt_getconstant_path = 9091/575973 (0.01578372597326611)
dupn = 9056/575973 (0.015722959235936407)
throw = 8283/575973 (0.014380882437197578)
topn = 5567/575973 (0.009665383620412762)
getblockparamproxy = 5109/575973 (0.008870207457641244)
dup = 3215/575973 (0.0055818588718568405)
opt_aset = 2977/575973 (0.005168645058014872)
opt_neq = 2824/575973 (0.004903007606259321)
putstring = 2763/575973 (0.004797099864056128)

setlocal_WC_0: total = 501916

getlocal_WC_0 = 255821/501916 (0.5096888722415703)
putself = 52750/501916 (0.10509726727181441)
branchunless = 39432/501916 (0.07856294678790873)
getlocal_WC_1 = 37157/501916 (0.07403031582974043)
getinstancevariable = 34949/501916 (0.06963117334374676)
putnil = 20347/501916 (0.04053865587070347)
jump = 17778/501916 (0.03542026952717188)
putobject = 17315/501916 (0.034497804413487515)
setlocal_WC_0 = 9025/501916 (0.017981096438447867)
branchif = 8596/501916 (0.017126371743478988)
opt_getconstant_path = 6918/501916 (0.013783182843344304)

getinstancevariable: total = 415153

getlocal_WC_0 = 148413/415153 (0.3574898892697391)
dup = 75487/415153 (0.18182934966145012)
opt_send_without_block = 55129/415153 (0.13279200680231143)
leave = 51955/415153 (0.12514663268722614)
send = 34906/415153 (0.0840798452618673)
getlocal_WC_1 = 11395/415153 (0.02744771204832917)
putself = 9388/415153 (0.02261334977707014)
opt_not = 5817/415153 (0.014011701709971985)
opt_empty_p = 5361/415153 (0.01291331147793705)
branchunless = 4516/415153 (0.010877917297960029)
branchif = 2780/415153 (0.006696326414598955)
putobject = 2197/415153 (0.005292024867940254)
getblockparamproxy = 1440/415153 (0.003468600732741905)
opt_getconstant_path = 1399/415153 (0.0033698419618791143)
dupn = 1207/415153 (0.002907361864180194)

pop: total = 407405

getlocal_WC_0 = 102993/407405 (0.2528024938329181)
getinstancevariable = 97492/407405 (0.23929995949976068)
putself = 68952/407405 (0.16924681827665344)
leave = 45673/407405 (0.11210711699660043)
getlocal = 33158/407405 (0.08138829911267657)
jump = 20658/407405 (0.050706299628134166)
getlocal_WC_1 = 14719/407405 (0.03612866803303838)
putnil = 12745/407405 (0.03128336667443944)
opt_getconstant_path = 8682/407405 (0.021310489561983774)

dup: total = 374949

branchif = 124950/374949 (0.33324532136370544)
objtostring = 99540/374949 (0.265476104750246)
branchunless = 63204/374949 (0.16856692510181384)
setlocal_WC_0 = 49420/374949 (0.13180459209119108)
setlocal_WC_1 = 23025/374949 (0.06140835153580887)
setinstancevariable = 10742/374949 (0.028649229628562818)
branchnil = 3136/374949 (0.008363804144030255)

branchif: total = 356156

pop = 132052/356156 (0.3707701119734049)
getlocal_WC_0 = 62953/356156 (0.17675681442963195)
opt_getconstant_path = 53491/356156 (0.15018980446770516)
putself = 34738/356156 (0.09753591122991048)
leave = 32630/356156 (0.09161715652691517)
getinstancevariable = 14879/356156 (0.04177663720392188)
putnil = 11514/356156 (0.03232853019463381)
putobject = 8386/356156 (0.02354586192567302)
setn = 3319/356156 (0.009318950122979818)

opt_getconstant_path: total = 346198

getlocal_WC_0 = 135407/346198 (0.39112588749790583)
topn = 97840/346198 (0.282612840051069)
opt_send_without_block = 60282/346198 (0.1741257892882108)
opt_getconstant_path = 27152/346198 (0.07842910704279055)
putself = 13424/346198 (0.038775498414202275)
putobject = 6356/346198 (0.018359435929728076)
opt_eq = 1105/346198 (0.0031918150884753813)

getlocal_WC_1: total = 293859

getlocal_WC_0 = 100208/293859 (0.3410070816275833)
getlocal_WC_1 = 38592/293859 (0.13132829009831246)
opt_send_without_block = 34641/293859 (0.11788306636856452)
putself = 33637/293859 (0.11446646180651265)
putobject_INT2FIX_1_ = 22719/293859 (0.07731258869049443)
leave = 17252/293859 (0.05870842819175183)
send = 14852/293859 (0.05054124597170752)
opt_ltlt = 14227/293859 (0.048414375601904314)
opt_aref = 11208/293859 (0.03814074096760691)
branchunless = 4270/293859 (0.014530778366495497)

opt_aref: total = 252015

leave = 65990/252015 (0.261849493085729)
setlocal_WC_0 = 64401/252015 (0.2555443128385215)
dup = 41088/252015 (0.16303791440985654)
opt_send_without_block = 37256/252015 (0.1478324702894669)
branchunless = 9795/252015 (0.03886673412296887)
putobject = 8833/252015 (0.03504950102176458)
opt_ltlt = 8343/252015 (0.03310517231117195)
getlocal_WC_1 = 8320/252015 (0.033013907902307404)
putnil = 5552/252015 (0.02203043469634744)

putnil: total = 202489

defined = 70251/202489 (0.3469373644988123)
getlocal_WC_1 = 25255/202489 (0.1247228244497232)
setlocal_WC_0 = 24352/202489 (0.1202633229459378)
leave = 18710/202489 (0.09240008099205389)
getinstancevariable = 16296/202489 (0.0804784457427317)
topn = 14179/202489 (0.07002355683518612)
setinstancevariable = 9478/202489 (0.04680748090019705)
jump = 8314/202489 (0.04105902049000192)
opt_aref = 5512/202489 (0.0272212317706147)
getlocal_WC_0 = 3793/202489 (0.01873188173184716)
opt_getconstant_path = 2104/202489 (0.010390687889218674)
dup = 1785/202489 (0.008815293670273446)
putself = 1180/202489 (0.0058274770481359485)

send: total = 183566

nop = 49785/183566 (0.2712103548587429)
getinstancevariable = 47534/183566 (0.2589477354194132)
leave = 18710/183566 (0.10192519311855136)
setlocal_WC_0 = 11325/183566 (0.061694431430657094)
putobject = 11010/183566 (0.05997842737761895)
putnil = 8947/183566 (0.0487399627381977)
opt_getconstant_path = 8893/183566 (0.04844579061481974)
putself = 8374/183566 (0.0456184696512426)
newhash = 8272/183566 (0.04506281119597311)
getlocal_WC_0 = 4656/183566 (0.025364174193478094)
getlocal_WC_1 = 4065/183566 (0.022144623732063672)
pop = 1046/183566 (0.005698222982469521)

topn: total = 117811

opt_send_without_block = 117589/117811 (0.9981156258753427)

anytostring: total = 99551

putobject = 67755/99551 (0.6806059205834195)
getlocal_WC_0 = 22765/99551 (0.22867675864632198)
concatstrings = 9022/99551 (0.09062691484766602)

objtostring: total = 99546

anytostring = 99199/99546 (0.9965141743515561)

nop: total = 93985

getlocal_WC_1 = 20987/93985 (0.22330159067936373)
opt_getconstant_path = 17057/93985 (0.18148640740543703)
leave = 15081/93985 (0.16046177581528967)
getlocal_WC_0 = 14317/93985 (0.15233281906687238)
putobject = 10998/93985 (0.11701867319253072)
getinstancevariable = 8729/93985 (0.09287652284939087)
putself = 5939/93985 (0.06319093472362611)

jump: total = 85391

setlocal_WC_0 = 36691/85391 (0.42968228501832745)
getlocal_WC_0 = 26456/85391 (0.30982187818388357)
putself = 8828/85391 (0.1033832605309693)
opt_aset = 8290/85391 (0.09708283074328676)
putnil = 2795/85391 (0.0327317867222541)

opt_empty_p: total = 79911

branchunless = 26126/79911 (0.3269387193252493)
branchif = 25605/79911 (0.320418966099786)
leave = 21867/79911 (0.27364192664339076)
opt_send_without_block = 5527/79911 (0.06916444544555818)

opt_aset: total = 79462

pop = 78195/79462 (0.9840552717021973)
opt_send_without_block = 1255/79462 (0.015793712718028742)

invokesuper: total = 77283

leave = 36308/77283 (0.46980577876117646)
putself = 27004/77283 (0.3494170774944037)
branchunless = 5514/77283 (0.07134816195023486)
getlocal_WC_0 = 3717/77283 (0.048095959007802495)
getinstancevariable = 2502/77283 (0.032374519622685456)

setinstancevariable: total = 72992

putself = 20776/72992 (0.28463393248575186)
putobject = 13321/72992 (0.18249945199473916)
getlocal_WC_0 = 12984/72992 (0.17788250767207364)
leave = 10555/72992 (0.1446048882069268)
putnil = 9514/72992 (0.1303430512932924)
newhash = 2639/72992 (0.03615464708461201)
getinstancevariable = 1053/72992 (0.014426238491889521)

defined: total = 70673

dup = 44687/70673 (0.6323065385649399)
branchunless = 22244/70673 (0.3147453765936072)
branchif = 3177/70673 (0.04495351831675463)

opt_nil_p: total = 68121

branchunless = 45081/68121 (0.6617783062491742)
opt_not = 14141/68121 (0.207586500491772)
branchif = 8716/68121 (0.12794879699358494)

opt_eq: total = 60030

branchunless = 55694/60030 (0.9277694486090288)
opt_send_without_block = 2890/60030 (0.048142595368982175)

getblockparamproxy: total = 58338

send = 58211/58338 (0.9978230313003531)

opt_not: total = 55510

branchunless = 26725/55510 (0.48144478472347324)
branchif = 16863/55510 (0.30378310214375787)
leave = 10455/55510 (0.1883444424428031)

getlocal: total = 51687

leave = 35926/51687 (0.6950683924391046)
opt_send_without_block = 3355/51687 (0.0649099386692979)
getlocal = 2819/51687 (0.054539826261922726)
putself = 2764/51687 (0.053475728906688336)
opt_ltlt = 2761/51687 (0.05341768723276646)
getblockparamproxy = 2521/51687 (0.04877435331901639)

opt_ltlt: total = 50282

pop = 31291/50282 (0.622310170637604)
leave = 17501/50282 (0.34805695875263515)
opt_send_without_block = 1347/50282 (0.02678891054452886)

setn: total = 45268

opt_aset = 41197/45268 (0.910068922859415)
adjuststack = 3319/45268 (0.07331890076875497)

opt_invokebuiltin_delegate_leave: total = 40553

opt_send_without_block = 22410/40553 (0.5526101644761177)
setlocal_WC_0 = 11084/40553 (0.2733213325771213)
getlocal_WC_0 = 5945/40553 (0.14659827879565013)

concatstrings: total = 34686

leave = 22567/34686 (0.6506083145937842)
opt_send_without_block = 8557/34686 (0.24669895635126565)
setlocal_WC_0 = 3044/34686 (0.08775874992792482)

newhash: total = 25952

setlocal_WC_0 = 11376/25952 (0.43834771886559803)
leave = 5803/25952 (0.22360511713933415)
setinstancevariable = 5238/25952 (0.20183415536374846)
opt_send_without_block = 2975/25952 (0.11463471023427867)

opt_plus: total = 24963

dup = 22720/24963 (0.9101470175860273)
setlocal_WC_0 = 1479/24963 (0.05924768657613268)

putobject_INT2FIX_1_: total = 24922

opt_plus = 24265/24922 (0.9736377497793115)

setlocal_WC_1: total = 23134

opt_aref = 22719/23134 (0.9820610357050229)

splatarray: total = 20638

getblockparamproxy = 12310/20638 (0.5964725264075976)
opt_send_without_block = 6051/20638 (0.2931970152146526)
invokesuper = 1148/20638 (0.055625545110960364)

newarray: total = 15162

setlocal_WC_0 = 6634/15162 (0.4375412214747395)
leave = 6589/15162 (0.4345732752934969)

dupn: total = 12118

opt_aref = 12118/12118 (1.0)

putstring: total = 11559

getlocal_WC_0 = 5518/11559 (0.47737693572108314)
putself = 2859/11559 (0.24733973527121722)
newhash = 2763/11559 (0.23903451855696858)

opt_size: total = 8717

putself = 8272/8717 (0.9489503269473443)

invokeblock: total = 8685

leave = 3786/8685 (0.4359240069084629)
putself = 3020/8685 (0.34772596430627517)
nop = 1043/8685 (0.12009211283822682)

throw: total = 8552

setn = 8281/8552 (0.968311506080449)

expandarray: total = 7141

setlocal_WC_0 = 7112/7141 (0.9959389441254726)

adjuststack: total = 3441

leave = 3281/3441 (0.9535018889857599)

opt_neq: total = 3388

leave = 2789/3388 (0.8231995277449823)

branchnil: total = 3137

opt_not = 2759/3137 (0.8795027095951546)

putobject_INT2FIX_0_: total = 3050

opt_aref = 1080/3050 (0.3540983606557377)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment