From e14e8047a3fa480cada70481649b85d9f20c5081 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Mon, 7 Dec 2020 10:28:47 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E3=83=99=E3=83=B3=E3=83=81=E3=83=9E?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E7=B5=90=E6=9E=9C=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark-results.csv | 104 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 benchmark-results.csv diff --git a/benchmark-results.csv b/benchmark-results.csv new file mode 100644 index 0000000..870a381 --- /dev/null +++ b/benchmark-results.csv @@ -0,0 +1,104 @@ +"Benchmark","Mode","Threads","Samples","Score","Score Error (99.9%)","Unit" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.fastKFunctionCall","thrpt",3,9,102948283.411698,822116.039959,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.fastKFunctionCallBy","thrpt",3,9,105609306.228242,13004565.012922,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.fastKFunctionCallByCollection","thrpt",3,9,100802768.049246,7648170.613998,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.javaConstructor","thrpt",3,9,104267558.375530,394266.734433,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.kFunctionCall","thrpt",3,9,77096714.157655,9178320.812874,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.kFunctionCallBy","thrpt",3,9,15519730.191140,202921.673531,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallConstructorBenchmark.normalCall","thrpt",3,9,537835106.876175,739772.498063,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithInstanceCall","thrpt",3,9,104969319.924771,307692.352939,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithInstanceCallBy","thrpt",3,9,104794817.246040,8426992.887039,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithInstanceCallByCollection","thrpt",3,9,104703353.130804,705162.904022,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithoutInstanceCall","thrpt",3,9,78004878.740490,8175478.159877,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithoutInstanceCallBy","thrpt",3,9,80870449.818569,11524676.345388,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithoutInstanceCallByCollection","thrpt",3,9,77711742.508986,14202590.558610,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.javaMethod","thrpt",3,9,101025048.727092,5678883.037819,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.kFunctionCall","thrpt",3,9,84200278.974449,252859.013757,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.kFunctionCallBy","thrpt",3,9,15461329.423620,493574.295254,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallInstanceMethodBenchmark.normalCall","thrpt",3,9,404349069.870507,1914239.917851,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,105252947.294532,366085.227335,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithInstanceCallBy","thrpt",3,9,112420267.352581,549548.197191,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithInstanceCallByCollection","thrpt",3,9,104346437.014177,238236.219767,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,105597924.092009,264673.116185,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCallBy","thrpt",3,9,112229464.257916,1321572.063765,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCallByCollection","thrpt",3,9,104325880.146417,185954.195880,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithInstanceCall","thrpt",3,9,105314828.021236,540773.976078,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithInstanceCallBy","thrpt",3,9,108591439.685654,9754156.991144,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithInstanceCallByCollection","thrpt",3,9,101548042.841449,6971278.354320,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithoutInstanceCall","thrpt",3,9,104925307.056850,1482187.477867,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithoutInstanceCallBy","thrpt",3,9,112577928.714074,374991.469371,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithoutInstanceCallByCollection","thrpt",3,9,94704588.633609,12452304.628810,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.functionByMethodReferenceCall","thrpt",3,9,83548738.043209,290194.865217,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.functionByMethodReferenceCallBy","thrpt",3,9,15781275.302548,323582.883989,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.functionByReflectionCall","thrpt",3,9,75664757.952827,9455040.728900,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.functionByReflectionCallBy","thrpt",3,9,13479338.225950,702333.330243,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.javaMethod","thrpt",3,9,102145026.028381,364283.010544,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallObjectMethodBenchmark.normalCall","thrpt",3,9,538539504.321839,4841073.794625,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,46091888.446197,1838139.100310,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithInstanceCallBy","thrpt",3,9,42086584.495383,1663254.302689,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithInstanceCallByCollection","thrpt",3,9,42058064.373197,1737374.774040,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,41016755.409692,2693922.379679,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCallBy","thrpt",3,9,40060744.316515,1798919.223660,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCallByCollection","thrpt",3,9,40636888.573131,4036818.782924,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionFromClassCall","thrpt",3,9,44854980.620787,5351672.941044,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionFromClassCallBy","thrpt",3,9,43184421.705381,2422616.392811,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionFromClassCallByCollection","thrpt",3,9,40984309.532849,1401485.522224,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.functionByMethodReferenceCall","thrpt",3,9,41291835.716500,2876738.731464,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.functionByMethodReferenceCallBy","thrpt",3,9,13190892.216397,149581.434526,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.functionFromClassCall","thrpt",3,9,81207922.617409,6088396.410255,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.functionFromClassCallBy","thrpt",3,9,13989280.611233,315047.139465,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.javaMethod","thrpt",3,9,106051900.939936,5935532.469432,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelExtensionFunBenchmark.normalCall","thrpt",3,9,405348173.278337,1587258.035768,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.fastKFunctionCall","thrpt",3,9,113663007.247217,665503.907356,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.fastKFunctionCallBy","thrpt",3,9,113788710.999109,14603114.818245,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.fastKFunctionCallByCollection","thrpt",3,9,110808279.911504,338757.641466,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.javaMethod","thrpt",3,9,113634719.110143,278274.881090,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.kFunctionCall","thrpt",3,9,91435909.011002,9190852.361848,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.kFunctionCallBy","thrpt",3,9,16030918.019724,299548.069957,"ops/s" +"com.mapk.fastkfunction.fastkfunction.CallTopLevelFunBenchmark.normalCall","thrpt",3,9,540773793.550467,1130013.809915,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.fastKFunctionCall","thrpt",3,9,356409525.996704,1243846.187240,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.javaConstructor","thrpt",3,9,360415771.269632,3949054.401345,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.kFunctionCall","thrpt",3,9,216949612.341388,1495388.461219,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.kFunctionCallBy","thrpt",3,9,43532534.284566,275198.125680,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.normalCall","thrpt",3,9,564598133.743254,779053.230227,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallConstructorBenchmark.singleArgFastKFunctionCall","thrpt",3,9,382129250.560524,1906292.321003,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithInstanceCall","thrpt",3,9,321048345.005285,2351643.633677,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.fastKFunctionWithoutInstanceCall","thrpt",3,9,179903839.575557,859973.997583,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.javaMethod","thrpt",3,9,322708811.856795,1257373.322287,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.kFunctionCall","thrpt",3,9,185905280.663011,981288.044698,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.kFunctionCallBy","thrpt",3,9,42640505.256977,367973.273277,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.normalCall","thrpt",3,9,485300871.043384,2434153.951672,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.singleArgFastKFunctionWithInstanceCall","thrpt",3,9,377790202.167842,3329873.299739,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallInstanceMethodBenchmark.singleArgFastKFunctionWithoutInstanceCall","thrpt",3,9,188329646.032570,1003576.924360,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,320499676.423798,1096313.092519,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,307087172.953391,17886681.519526,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithInstanceCall","thrpt",3,9,319923764.742794,626262.521376,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.fastKFunctionByReflectionWithoutInstanceCall","thrpt",3,9,320247300.841363,1117684.367355,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.functionByMethodReferenceCall","thrpt",3,9,188408189.354354,675297.634001,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.functionByMethodReferenceCallBy","thrpt",3,9,42569076.916657,174839.402171,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.functionByReflectionCall","thrpt",3,9,162210692.371446,7183338.263508,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.functionByReflectionCallBy","thrpt",3,9,29887037.626567,86110.228929,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.javaMethod","thrpt",3,9,322787171.991974,588787.238765,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.normalCall","thrpt",3,9,552178345.922162,2718733.953216,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.singleArgFastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,379662407.116941,1619735.917719,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.singleArgFastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,379008514.041123,1418230.477031,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.singleArgFastKFunctionByReflectionWithInstanceCall","thrpt",3,9,379278058.230342,1356418.058492,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallObjectMethodBenchmark.singleArgFastKFunctionByReflectionWithoutInstanceCall","thrpt",3,9,371821620.232637,17021871.455145,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,118966341.149008,1213021.234121,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,85141437.226445,918042.448391,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.fastKFunctionFromClassCall","thrpt",3,9,117100289.538140,2958389.225322,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.functionByMethodReferenceCall","thrpt",3,9,92939726.659524,1844001.973805,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.functionByMethodReferenceCallBy","thrpt",3,9,35027074.529450,125601.435000,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.functionFromClassCall","thrpt",3,9,154897209.251335,2230641.284295,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.functionFromClassCallBy","thrpt",3,9,33684677.992485,271797.069996,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.javaMethod","thrpt",3,9,319306897.502693,6946710.311100,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.normalCall","thrpt",3,9,485050833.542885,2197973.481526,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.singleArgFastKFunctionByMethodReferenceWithInstanceCall","thrpt",3,9,356311961.085428,2065988.353771,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.singleArgFastKFunctionByMethodReferenceWithoutInstanceCall","thrpt",3,9,91670798.955163,1257647.727238,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelExtensionFunBenchmark.singleArgFastKFunctionFromClassCall","thrpt",3,9,355308292.602249,3192295.737024,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.fastKFunctionCall","thrpt",3,9,320677801.142358,1394870.944379,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.javaMethod","thrpt",3,9,349518702.421319,24286974.380802,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.kFunctionCall","thrpt",3,9,191457147.208002,1274124.812140,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.kFunctionCallBy","thrpt",3,9,43824053.014540,654562.970605,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.normalCall","thrpt",3,9,552110727.378870,1756077.896530,"ops/s" +"com.mapk.fastkfunction.singleargfastkfunction.CallTopLevelFunBenchmark.singleArgFastKFunctionCall","thrpt",3,9,386224539.211829,27977580.338085,"ops/s" From b72bf84a0ab636e9801b8d65fa1863b8c3bb8e5a Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 12 Dec 2020 09:53:03 +0900 Subject: [PATCH 2/6] =?UTF-8?q?Benchmark=E7=94=A8=E3=82=A2=E3=83=8E?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=8C=E6=8C=AF?= =?UTF-8?q?=E3=82=89=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8C=E3=81=B0=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E3=82=92=E5=87=BA=E3=81=95=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.idea/misc.xml b/.idea/misc.xml index 38167d7..aeeefe1 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,11 @@ + + + + + + From b09993e038930300e09df3fa7fe5d61c5779fed8 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 12 Dec 2020 10:26:28 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E3=83=99=E3=83=B3=E3=83=81=E3=83=9E?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=82=B0=E3=83=A9=E3=83=95=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pictures/ConstructorBenchmarkResultGraph.png | Bin 0 -> 11921 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pictures/ConstructorBenchmarkResultGraph.png diff --git a/pictures/ConstructorBenchmarkResultGraph.png b/pictures/ConstructorBenchmarkResultGraph.png new file mode 100644 index 0000000000000000000000000000000000000000..b199fb5ac66eab88af0d83c84fd838c35d8cd16b GIT binary patch literal 11921 zcmdUVc{r5s+czRg3za1$M4PdO3ZV^^t%w=hj3rH$7Q2iYOGQ~CvLssxF=K3F8Ouzv zg^+dZ`dYG+Z7gGXuAy)BJ$}F6@jTD_9`7G-9mg2A`?~M*x~|W8o}cq`ozHJ*tMA^) zx08W^VfVGGS9BQ|m|zSHjE-#E!Il0YR{{fr1nk zt#wnhW0I}k%tOy=cfQy1h$gg?Eq0w@(rgdh-Oh388Jc0+Y=ql3;R%ji+h14Q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ongwrong Date: Sat, 12 Dec 2020 10:40:12 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 616ac13..0f1364c 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ val result: Sample = fastKFunction.generateBucket() ## Installation `FastKFunction` is published on JitPack. -You can use this library on maven, gradle and any other build tools. +You can use this library on `Maven`, `gradle` and any other build tools. Please see here for the introduction method. -- [ProjectMapK / FastKFunction](https://jitpack.io/#ProjectMapK/FastKFunction) +- [ProjectMapK / FastKFunction](https://jitpack.io/#ProjectMapK/FastKFunction) ## How to use FastKFunction. From 3162a571c4241db449b392721fa7c23ebe684394 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 12 Dec 2020 10:42:18 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E9=AB=98=E9=80=9F=E6=80=A7=E5=91=A8?= =?UTF-8?q?=E3=82=8A=E3=82=92=E6=9C=80=E5=88=9D=E3=81=AB=E6=9B=B8=E3=81=8F?= =?UTF-8?q?=E5=BD=A2=E3=81=A7=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0f1364c..76f4dff 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,41 @@ val result: Sample = fastKFunction.generateBucket() .let { fastKFunction.callBy(it) } ``` +## How Fast? +Calling the constructor is more than 1.2 times faster than calling `KFunction` with `call`, +and more than 6 times faster than calling it with `callBy`. + +You can get the same speed as `reflection` in `Java`. + +| | ops/s |Ratio| +|-----------------------|------------:|-----| +| Java Constructor |`104267558.4`|`6.7`| +| FastKFunction(call) |`102948283.4`|`6.6`| +| FastKFunction(callBy) |`105609306.2`|`6.8`| +| KFunction(call) | `77096714.2`|`5.0`| +| KFunction(callBy) | `15519730.2`|`1` | + +![ConstructorBenchmarkResultGraph.png](./pictures/ConstructorBenchmarkResultGraph.png) + +*This is the score I got on a `Ryzen7 3700X` in a `Windows 10` environment, with [3b8687](https://github.com/ProjectMapK/FastKFunction/tree/3b8687da712319a49e4f58a38edbb016cc0c41b7) committed. + +### Raw data, and other comparisons +You can get full benchmark score and some other graphs [here](https://docs.google.com/spreadsheets/d/1DJhf8KX1-BAxCGor5cZdlO3626AZbKeet-rkk26XGAE/). + +### Mechanism +I have a blog post on the mechanism of fast invocation (in Japanese). + +- [【Kotlin】KFunctionを高速に呼び出す(前編) \- Qiita](https://qiita.com/wrongwrong/items/f7b15d54956191f471d1) +- [【Kotlin】KFunctionを高速に呼び出す(後編) \- Qiita](https://qiita.com/wrongwrong/items/fe75bae3911eff319e68) + +### Benchmarking +You can run the benchmark with the `./gradlew jmh`. +Please note that it will take about 5 hours in total if executed with the default settings. + +```bash +./gradlew jmh +``` + ## Installation `FastKFunction` is published on JitPack. You can use this library on `Maven`, `gradle` and any other build tools. @@ -115,11 +150,3 @@ val fastKFunction: SingleArgFastKFunction = SingleArgFastKFunction.of(:: val result: Sample = fastKFunction.call(1) ``` - -## Benchmark -You can run the benchmark with the `./gradlew jmh`. -Please note that it will take about 2 hours in total if executed with the default settings. - -```bash -./gradlew jmh -``` From a2fca71f17942c343f8a7cd24122bfa5be8fd078 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 12 Dec 2020 10:43:31 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index f102cc4..ac86213 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "com.mapk" -version = "0.1-alpha" +version = "0.1.0" repositories { mavenCentral()