Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisations #211

Merged
merged 6 commits into from
Jan 27, 2022
Merged

Optimisations #211

merged 6 commits into from
Jan 27, 2022

Conversation

L-as
Copy link
Member

@L-as L-as commented Jan 27, 2022

No description provided.

@L-as L-as changed the base branch from staging to master January 27, 2022 17:39
@L-as L-as merged commit 7c64217 into master Jan 27, 2022
@nixinator nixinator deleted the las/optimisations branch January 27, 2022 18:22
@nixinator nixinator restored the las/optimisations branch January 27, 2022 18:22
@srid
Copy link
Member

srid commented Jan 27, 2022

Changed benchmarks:                                                                                             
  20.370 types:builtin:intlist:plistEquals:==(n=3)            9487399(cpu)   +1.0%  21146(mem)   +1.0%  93(bytes)   -2.0%
  20.370 types:builtin:intlist:uncons:ChooseList               806241(cpu)  +11.0%   1864(mem)  +16.0%  26(bytes)  -13.0%
  20.370 types:builtin:intlist:uncons:head-and-tail            687149(cpu)  +13.0%   1464(mem)  +20.0%  23(bytes)  -18.0%
  20.370 types:builtin:intlist:uncons:head-and-tail-and-null  1283745(cpu)   +7.0%   2997(mem)  +10.0%  35(bytes)  -24.0%
  20.370 types:builtin:intlist:x1+x2:builtin                  1212996(cpu)   +7.0%   2098(mem)  +14.0%  29(bytes)  -15.0%
  20.370 types:builtin:intlist:x1+x2:pmatch                   2437094(cpu)   +4.0%   4794(mem)   +6.0%  50(bytes)  -26.0%
  20.370                                                                                                                 
  20.370 Added benchmarks:                                                                                               
  20.370 types:builtin:intlist:primitives:()                        29873(cpu)  200(mem)   6(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> #31)              29873(cpu)  200(mem)  10(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> #31313131313131)  29873(cpu)  200(mem)  16(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> ())               29873(cpu)  200(mem)   6(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> 0)                29873(cpu)  200(mem)   7(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> 1)                29873(cpu)  200(mem)   7(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> 1048576)          29873(cpu)  200(mem)  10(bytes)                      
  20.370 types:builtin:intlist:primitives:(\i0 -> 512)              29873(cpu)  200(mem)   8(bytes)                      
  20.371 types:builtin:intlist:primitives:(\i0 -> True)             29873(cpu)  200(mem)   6(bytes)                      
  20.371 types:builtin:intlist:primitives:(\i0 -> [()])             29873(cpu)  200(mem)   8(bytes)                      
  20.371 types:builtin:intlist:primitives:(\i0 -> addInteger)       29873(cpu)  200(mem)   6(bytes)                      
  20.371 types:builtin:intlist:primitives:(\i0 -> i1)               29873(cpu)  200(mem)   7(bytes)                      
  20.371 types:builtin:intlist:primitives:addInteger                29873(cpu)  200(mem)   6(bytes)                      
  20.374 

@L-as
Copy link
Member Author

L-as commented Jan 27, 2022

Good reductions of size with some unfortunate increases in CPU and memory, which I didn't notice, because it wasn't what I was looking for. It makes sense, because deduplication through a let-binding will always increase CPU and memory usage, even if pconstant "huge string" <> pconstant "huge string" duplicates the same string twice. Right now, the way the Plutus ecosystem is, script size is more important than anything. As CIP 33 is introduced, we might want to prioritise CPU and memory more.

@L-as L-as deleted the las/optimisations branch January 27, 2022 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants