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

Performance depends on the size of Arr/pack #109

Closed
leissa opened this issue Oct 13, 2022 · 0 comments · Fixed by #110 or #219
Closed

Performance depends on the size of Arr/pack #109

leissa opened this issue Oct 13, 2022 · 0 comments · Fixed by #110 or #219
Labels
compiler performance Performance bug within the compiler itself

Comments

@leissa
Copy link
Member

leissa commented Oct 13, 2022

Here Thorin is doing things 100000000 times.

.import mem;

.let i32 = .Idx 4294967296;
.let size = 100000000:.Nat;

.cn .extern main [mem: %mem.M, argc: i32, argv : %mem.Ptr («⊤:.Nat; %mem.Ptr («⊤:.Nat; .Idx 256», 0:.Nat)», 0:.Nat), return : .Cn [%mem.M, i32]] = {
    .let (alloc_mem, arr) = %mem.alloc (<<size; i32>>, 0) (mem);
    .let lea = %mem.lea (size, <size; i32>, 0) (arr, 0:(.Idx 100));
    .let (load_mem, val) = %mem.load (i32, 0) (alloc_mem, lea);

    return ( load_mem, 1:i32 )
};
@leissa leissa mentioned this issue Oct 13, 2022
@leissa leissa added the compiler performance Performance bug within the compiler itself label Oct 14, 2022
@leissa leissa reopened this Dec 5, 2022
leissa added a commit that referenced this issue May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler performance Performance bug within the compiler itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant