Skip to content

Instantly share code, notes, and snippets.

@zhfnjust
Created October 26, 2022 03:00
Show Gist options
  • Save zhfnjust/111ca87443445c1e4b1116f8c25b8b79 to your computer and use it in GitHub Desktop.
Save zhfnjust/111ca87443445c1e4b1116f8c25b8b79 to your computer and use it in GitHub Desktop.
sCrypt compiler benchmark result
escrow.scrypt False 0.8086118698120117
faucet.scrypt False 0.36995792388916016
faucetV2.scrypt False 0.39221715927124023
final_loop_import.scrypt False 0.2203052043914795
final_loop_library.scrypt False 0.27123188972473145
final_loop_main.scrypt False 0.44572019577026367
fixedPoint.scrypt False 0.2210087776184082
fixedPointTest.scrypt False 0.28333210945129395
forward.scrypt False 0.2912466526031494
fractionMath.scrypt False 0.2535989284515381
fractionMathTest.scrypt False 0.30983495712280273
hashpuzzle.scrypt False 0.272388219833374
hashpuzzlep2pkh.scrypt False 0.3177528381347656
helloworld.scrypt False 0.23197698593139648
incrementLocktime.scrypt False 3.39408278465271
incrementLocktimeSplit.scrypt False 0.4955430030822754
kaggle.scrypt False 0.4601860046386719
liberc20.scrypt False 0.3053090572357178
library.scrypt False 0.2950632572174072
lottery.scrypt False 0.19572210311889648
mast.scrypt False 0.27468299865722656
matrix.scrypt False 0.6833300590515137
merklePath.scrypt False 0.237213134765625
merkleToken.scrypt False 0.5332789421081543
pyramid.scrypt False 0.3541889190673828
rabin.scrypt False 0.2468867301940918
rabinTest.scrypt False 0.2862429618835449
recurring.scrypt False 0.3177669048309326
ringsig.scrypt False 80.38821601867676
rps.scrypt False 0.3067352771759033
rpuzzle.scrypt False 0.19436383247375488
rule110.scrypt False 0.29068803787231445
schnorr.scrypt False 35.97417402267456
secp521r1.scrypt False 0.6848001480102539
sensibleSlashing.scrypt False 0.35896897315979004
serializer.scrypt False 0.2656130790710449
serializerTest.scrypt False 0.4590189456939697
shift.scrypt False 0.18689203262329102
shift10.scrypt False 0.19623303413391113
shift10Test.scrypt False 0.23533010482788086
shiftTest.scrypt False 0.21039485931396484
sighash.scrypt False 33.79535484313965
simpleBVM.scrypt False 0.3206441402435303
spvToken.scrypt False 0.3487217426300049
stateMap.scrypt False 0.2720601558685303
stateStruct.scrypt False 0.2800309658050537
structdemo.scrypt False 0.19513702392578125
sudoku.scrypt False 2.5899100303649902
token.scrypt True 0.33417606353759766
tokenSale.scrypt True 0.24510908126831055
tokenSwap.scrypt True 1.0401368141174316
tokenUtxo.scrypt True 0.3174097537994385
treeSig.scrypt True 0.2680470943450928
tsp.scrypt True 0.5720572471618652
turingMachine.scrypt True 0.4338948726654053
txUtil.scrypt True 0.2123279571533203
uniswap.scrypt True 0.8133680820465088
util.scrypt True 0.19644594192504883
vanityAddr.scrypt True 0.268604040145874
vault.scrypt True 0.4282560348510742
witnessBinaryOption.scrypt True 0.2183668613433838
witnessCLTV.scrypt True 0.2239971160888672
xorPuzzle.scrypt True 0.18403291702270508
zksnark.scrypt True 1.0378680229187012
clone.scrypt False 0.7851762771606445
cltv.scrypt False 0.31560707092285156
cltvOCS.scrypt False 0.29786014556884766
cointoss.scrypt False 0.24506402015686035
cointossxor.scrypt False 0.22872304916381836
conwaygol.scrypt False 1.7050738334655762
counter.scrypt False 0.2955586910247803
counterRaw.scrypt False 0.2989380359649658
crowdfund.scrypt False 0.34426403045654297
csv.scrypt False 0.6721158027648926
deadMansSwitchStatefull.scrypt False 1.9796180725097656
delegate.scrypt False 0.535444974899292
delegateToScript.scrypt False 0.32868075370788574
demo.scrypt False 0.21900010108947754
dummy_prescription.scrypt False 0.3400721549987793
dynamicArray.scrypt False 0.3184700012207031
dynamicArrayDemo.scrypt False 0.33484697341918945
ec.scrypt False 0.5285360813140869
ecAddition.scrypt False 0.2330150604248047
ecVerify.scrypt False 0.25571608543395996
ecdsa.scrypt False 1.3797600269317627
enforceAgentBitcoinTransfer.scrypt False 0.32007288932800293
erc20.scrypt False 0.492703914642334
erc721.scrypt False 0.3867361545562744
svd.scrypt False 0.9922311305999756
testUtil.scrypt False 0.2498922348022461
tictactoe.scrypt False 0.4788029193878174
timedcommit.scrypt False 0.26779603958129883
token.scrypt False 0.37102699279785156
tokenSale.scrypt False 0.4559619426727295
tokenSwap.scrypt False 0.9195830821990967
tokenUtxo.scrypt False 0.39599180221557617
treeSig.scrypt False 0.3590428829193115
tsp.scrypt False 0.5754392147064209
turingMachine.scrypt False 0.5513770580291748
txUtil.scrypt False 0.3211231231689453
uniswap.scrypt False 0.6851809024810791
util.scrypt False 0.33766674995422363
vanityAddr.scrypt False 0.32216620445251465
vault.scrypt False 0.5453701019287109
witnessBinaryOption.scrypt False 0.29598402976989746
witnessCLTV.scrypt False 0.29451799392700195
xorPuzzle.scrypt False 0.32953500747680664
zksnark.scrypt False 1.2186939716339111
OCSPreimage.scrypt True 0.27555108070373535
SuperAsset10.scrypt True 0.31880807876586914
SuperAssetNFT.scrypt True 0.22456002235412598
accumulatorMultiSig.scrypt True 0.23456692695617676
ackermann.scrypt True 0.42093992233276367
acs.scrypt True 0.36460208892822266
advancedCounter.scrypt True 0.3696310520172119
advancedTokenSale.scrypt True 0.23678994178771973
array.scrypt True 0.3723909854888916
arrayUtil.scrypt True 0.19653868675231934
arraydemo.scrypt True 0.6069231033325195
asm.scrypt True 0.2120048999786377
auction.scrypt True 0.34882593154907227
base58.scrypt True 0.2061901092529297
binaryOption.scrypt True 0.28058385848999023
blockPRNG.scrypt True 0.3806462287902832
blockTimeBet.scrypt True 0.6809608936309814
blockchain.scrypt True 0.5702309608459473
blockchainTest.scrypt True 0.8416388034820557
bn256.scrypt True 0.6118080615997314
bn256pairing.scrypt True 1.026824951171875
bns.scrypt True 0.2796909809112549
callee.scrypt True 0.2784461975097656
caller.scrypt True 0.41528964042663574
clone.scrypt True 0.2680809497833252
cltv.scrypt True 0.25734591484069824
cltvOCS.scrypt True 0.25446200370788574
cointoss.scrypt True 0.2297959327697754
cointossxor.scrypt True 0.3105168342590332
conwaygol.scrypt True 3.1916439533233643
counter.scrypt True 0.2767150402069092
counterRaw.scrypt True 0.2577517032623291
crowdfund.scrypt True 0.3077201843261719
csv.scrypt True 0.9979820251464844
deadMansSwitchStatefull.scrypt True 1.1311490535736084
delegate.scrypt True 0.470822811126709
delegateToScript.scrypt True 0.310513973236084
demo.scrypt True 0.19812393188476562
dummy_prescription.scrypt True 0.26703596115112305
dynamicArray.scrypt True 0.20356202125549316
dynamicArrayDemo.scrypt True 0.3440868854522705
ec.scrypt True 0.41361093521118164
ecAddition.scrypt True 0.25483202934265137
ecVerify.scrypt True 0.22294187545776367
ecdsa.scrypt True 2.4351260662078857
enforceAgentBitcoinTransfer.scrypt True 0.23729896545410156
erc20.scrypt True 0.5636436939239502
erc721.scrypt True 0.423947811126709
escrow.scrypt True 0.33272504806518555
faucet.scrypt True 0.39604616165161133
faucetV2.scrypt True 0.3667619228363037
final_loop_import.scrypt True 0.219254732131958
final_loop_library.scrypt True 0.24226713180541992
final_loop_main.scrypt True 0.42812609672546387
fixedPoint.scrypt True 0.22190403938293457
fixedPointTest.scrypt True 0.23478102684020996
forward.scrypt True 0.24814796447753906
fractionMath.scrypt True 0.23680782318115234
fractionMathTest.scrypt True 0.3043642044067383
hashpuzzle.scrypt True 0.24191522598266602
hashpuzzlep2pkh.scrypt True 0.22043991088867188
helloworld.scrypt True 0.20838689804077148
incrementLocktime.scrypt True 3.0844838619232178
incrementLocktimeSplit.scrypt True 0.44784092903137207
kaggle.scrypt True 0.5408077239990234
liberc20.scrypt True 0.37996697425842285
library.scrypt True 0.2155928611755371
lottery.scrypt True 0.1926562786102295
mast.scrypt True 0.3198537826538086
matrix.scrypt True 0.882652759552002
merklePath.scrypt True 0.19865107536315918
merkleToken.scrypt True 0.6185479164123535
merkleTree.scrypt True 0.26175618171691895
merkleTree2.scrypt True 0.20819520950317383
merkleTreeTest.scrypt True 0.505709171295166
meta.scrypt True 0.4378201961517334
mimc.scrypt True 0.2098541259765625
mimcTest.scrypt True 1.5901849269866943
modExp.scrypt True 0.49593210220336914
multiSig.scrypt True 0.21004104614257812
netflix.scrypt True 0.19818806648254395
nonFungibleToken.scrypt True 0.3267667293548584
optimalPushtx.scrypt True 0.2088150978088379
oracle.scrypt True 0.232741117477417
oracleTest.scrypt True 0.3878960609436035
p2gpk.scrypt True 89.07935786247253
p2nftpkh.scrypt True 0.19495177268981934
p2pkh.scrypt True 0.19541621208190918
p2sh.scrypt True 0.2819221019744873
partialSha256.scrypt True 0.8811650276184082
partialSha256Test.scrypt True 3.4773659706115723
pay2ContractHash.scrypt True 0.3697199821472168
pay2decrypt.scrypt True 31.881715059280396
perceptron.scrypt True 1.0223736763000488
perceptron2.scrypt True 0.27397894859313965
privkeypuzzle.scrypt True 0.19957709312438965
pyramid.scrypt True 0.272258996963501
rabin.scrypt True 0.19946599006652832
rabinTest.scrypt True 0.20472383499145508
recurring.scrypt True 0.28058695793151855
OCSPreimage.scrypt False 0.7923200130462646
SuperAsset10.scrypt False 0.36763477325439453
SuperAssetNFT.scrypt False 0.2878687381744385
accumulatorMultiSig.scrypt False 0.234144926071167
ackermann.scrypt False 0.27719926834106445
acs.scrypt False 0.2717111110687256
advancedCounter.scrypt False 0.34329915046691895
advancedTokenSale.scrypt False 0.28385186195373535
array.scrypt False 0.3497161865234375
arrayUtil.scrypt False 0.22305727005004883
arraydemo.scrypt False 0.34607791900634766
asm.scrypt False 0.26317501068115234
auction.scrypt False 0.4048759937286377
base58.scrypt False 0.22942781448364258
binaryOption.scrypt False 0.285581111907959
blockPRNG.scrypt False 0.37960386276245117
blockTimeBet.scrypt False 1.438260793685913
blockchain.scrypt False 0.6039869785308838
blockchainTest.scrypt False 0.6505126953125
bn256.scrypt False 0.5719678401947021
bn256pairing.scrypt False 1.2422699928283691
bns.scrypt False 0.24414682388305664
callee.scrypt False 0.3173999786376953
caller.scrypt False 0.43128490447998047
merkleTree.scrypt False 0.2714698314666748
merkleTree2.scrypt False 0.2864110469818115
merkleTreeTest.scrypt False 0.4188530445098877
meta.scrypt False 0.42009806632995605
mimc.scrypt False 0.28787827491760254
mimcTest.scrypt False 1.3468260765075684
modExp.scrypt False 0.395143985748291
multiSig.scrypt False 0.24875211715698242
netflix.scrypt False 0.23697423934936523
nonFungibleToken.scrypt False 0.34433984756469727
optimalPushtx.scrypt False 0.3553769588470459
oracle.scrypt False 0.287477970123291
oracleTest.scrypt False 0.3301522731781006
p2gpk.scrypt False 39.05546998977661
p2nftpkh.scrypt False 0.21246695518493652
p2pkh.scrypt False 0.23399686813354492
p2sh.scrypt False 0.2804141044616699
partialSha256.scrypt False 0.31662988662719727
partialSha256Test.scrypt False 1.7084910869598389
pay2ContractHash.scrypt False 0.3441789150238037
pay2decrypt.scrypt False 17.928194999694824
perceptron.scrypt False 0.6312849521636963
perceptron2.scrypt False 0.267719030380249
privkeypuzzle.scrypt False 0.21132397651672363
ringsig.scrypt True 158.18797612190247
rps.scrypt True 0.23783111572265625
rpuzzle.scrypt True 0.1481318473815918
rule110.scrypt True 0.2215580940246582
schnorr.scrypt True 45.171935081481934
secp521r1.scrypt True 0.31189703941345215
sensibleSlashing.scrypt True 0.24634599685668945
serializer.scrypt True 0.17098617553710938
serializerTest.scrypt True 0.33480072021484375
shift.scrypt True 0.1613612174987793
shift10.scrypt True 0.16188287734985352
shift10Test.scrypt True 0.174699068069458
shiftTest.scrypt True 0.16135215759277344
sighash.scrypt True 50.46496891975403
simpleBVM.scrypt True 0.2980518341064453
spvToken.scrypt True 0.3347020149230957
stateMap.scrypt True 0.3189828395843506
stateStruct.scrypt True 0.25069093704223633
structdemo.scrypt True 0.1593770980834961
sudoku.scrypt True 4.088525056838989
svd.scrypt True 0.9177408218383789
testUtil.scrypt True 0.18436384201049805
tictactoe.scrypt True 0.4100818634033203
timedcommit.scrypt True 0.16158509254455566
Original size Optimized size % gained
OCSPreimage 1671 1266 24.24
SuperAsset10 2689 1930 28.23
SuperAssetNFT 114 104 8.77
accumulatorMultiSig 426 380 10.80
ackermann 2213 1776 19.75
acs 807 601 25.53
advancedCounter 1841 1302 29.28
advancedTokenSale 1367 980 28.31
array 3494 2537 27.39
arraydemo 4523 4131 8.67
asm 140 105 25.00
auction 3626 2601 28.27
binaryOption 953 708 25.71
blockPRNG 3667 2804 23.53
blockTimeBet 8919 6207 30.41
blockchainTest 17945 13357 25.57
bn256 28 25 10.71
bn256pairing 28 25 10.71
bns 478 431 9.83
callee 1026 739 27.97
caller 2782 2116 23.94
clone 1026 751 26.80
cltv 552 438 20.65
cltvOCS 553 439 20.61
cointoss 60 55 8.33
cointossxor 62 55 11.29
conwaygol 85388 66389 22.25
counter 1781 1268 28.80
counterRaw 1020 754 26.08
crowdfund 1380 1066 22.75
csv 19390 14672 24.33
deadMansSwitchStatefull 22051 16802 23.80
delegate 7624 6549 14.10
delegateToScript 2578 2114 18.00
demo 79 55 30.38
dummy_prescription 916 680 25.76
dynamicArray 28 17 39.29
dynamicArrayDemo 4900 3452 29.55
ecAddition 295 239 18.98
ecdsa 76422 65153 14.75
enforceAgentBitcoinTransfer 338 257 23.96
erc20 9616 7072 26.46
erc721 6625 4834 27.03
escrow 2638 1725 34.61
faucet 2847 1935 32.03
faucetV2 4140 2902 29.90
final_loop_main 6092 4377 28.15
fixedPoint 1 1 0.00
fixedPointTest 205 128 37.56
forward 1260 890 29.37
fractionMathTest 1456 931 36.06
hashpuzzle 9 7 22.22
hashpuzzlep2pkh 80 40 50.00
helloworld 5 4 20.00
incrementLocktime 111297 90840 18.38
incrementLocktimeSplit 4179 3211 23.16
liberc20 2 2 0.00
library 43 22 48.84
lottery 607 514 15.32
mast 3093 2451 20.76
matrix 24394 21943 10.05
merkleToken 14350 11965 16.62
merkleTreeTest 11087 9733 12.21
meta 2976 2263 23.96
mimcTest 58293 43289 25.74
modExp 11417 8849 22.49
multiSig 28 28 0.00
netflix 31 27 12.90
nonFungibleToken 2376 1749 26.39
optimalPushtx 20 17 15.00
oracleTest 1783 1534 13.97
p2gpk 2809706 2721764 3.13
p2nftpkh 7 7 0.00
p2pkh 27 13 51.85
p2sh 809 592 26.82
partialSha256Test 110706 90373 18.37
pay2ContractHash 4238 3162 25.39
pay2decrypt 1405616 1361719 3.12
perceptron 29675 24988 15.79
perceptron2 3134 2517 19.69
privkeypuzzle 141 94 33.33
pyramid 2547 1750 31.29
rabinTest 93 54 41.94
recurring 2694 1926 28.51
ringsig 5618551 5442889 3.13
rps 2845 2051 27.91
rpuzzle 51 35 31.37
rule110 2275 1641 27.87
schnorr 2134974 2064137 3.32
sensibleSlashing 1946 1488 23.54
serializerTest 5535 3983 28.04
shift10 51 33 35.29
shift10Test 508 433 14.76
shiftTest 133 88 33.83
sighash 2137348 2066391 3.32
simpleBVM 5609 3620 35.46
spvToken 4678 3474 25.74
stateMap 6318 4598 27.22
stateStruct 2549 1793 29.66
structdemo 178 136 23.60
sudoku 188249 131577 30.10
svd 36744 32776 10.80
testUtil 1141 833 26.99
tictactoe 10939 8222 24.84
timedcommit 53 50 5.66
token 4483 3353 25.21
tokenSale 1277 910 28.74
tokenSwap 28256 22717 19.60
tokenUtxo 3556 2650 25.48
treeSig 2567 2075 19.17
tsp 20449 13603 33.48
turingMachine 6962 5554 20.22
uniswap 21269 15877 25.35
vanityAddr 1756 1515 13.72
vault 6296 4537 27.94
witnessBinaryOption 959 716 25.34
witnessCLTV 121 86 28.93
xorPuzzle 37 20 45.95
zksnark 28 25 10.71
--
Average size gained 22.72% ^-^
119 over 120 files were compiled (twice) for that. If all boilerplate is not compiled then some timeout during compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment