Chia-Network / clvm

[Contract Language|Chia Lisp] Virtual Machine
Apache License 2.0
86 stars 35 forks source link

update costs to more closely match run-time cost of rust implementation #78

Closed arvidn closed 3 years ago

arvidn commented 3 years ago

The cost of 1 roughly corresponds to 0.1 microsecond of runtime (on my MacBook Pro) with the rust implementation. Some really cheap operations had to be rounded up to cost 1.

You'll also notice that the the bytes cost dividers are smaller, meaning the cost per byte is higher now. This is a natural consequence of all operations being faster, the cost of accessing memory has not improved as much by the rust implementation and is relatively slower.