6 ms·
Some algorithmic competitions (eg. Polish Olympiad in Informatics) go even further, and judge programs not on execution time, but on executed instruction count,
by KptMarchewa 4y ago
Some algorithmic competitions (eg. Polish Olympiad in Informatics) go even further, and judge programs not on execution time, but on executed instruction count, effectively emulating processor with very large amount of RAM.
https://github.com/sio2project/sio2jail/blob/master/src/perf/PerfListener.cc https://github.com/sio2project/sio2jail/blob/master/src/perf...
- renonce 4y agoA practical example that counts instructions is EVM. Gas usage is counted deterministically to limit computation overhead, and smart contracts are designed to optimize away every unit of gas since they cost real money.