Speedup foldl over bytes #2

Merged
jbwdevries merged 1 commits from optimize_fold_bytes_inline_subscript_bytes_call into master 2022-08-21 13:39:44 +00:00
Owner

Prior to this PR, the compiler would call stdlib.types's
subscript_bytes.

However, that function performs some checks we do not need.

After this MR, folding iterates directly over the bytes
memory, saving the memory access checks and the function
calls. This gets us a speedup of about 43% less CPU time
used on Firefox.

Also, by default, the CRC32 page runs a shorter timing test.

Prior to this PR, the compiler would call stdlib.types's __subscript_bytes__. However, that function performs some checks we do not need. After this MR, folding iterates directly over the bytes memory, saving the memory access checks and the function calls. This gets us a speedup of about 43% less CPU time used on Firefox. Also, by default, the CRC32 page runs a shorter timing test.
jbwdevries added 1 commit 2022-08-21 13:38:31 +00:00
Prior to this PR, the compiler would call stdlib.types's
__subscript_bytes__.

However, that function performs some checks we do not need.

After this MR, folding iterates directly over the bytes
memory, saving the memory access checks and the function
calls. This gets us a speedup of about 43% less CPU time
used on Firefox.

Also, by default, the CRC32 page runs a shorter timing test.
jbwdevries merged commit c02afb05f4 into master 2022-08-21 13:39:44 +00:00
jbwdevries deleted branch optimize_fold_bytes_inline_subscript_bytes_call 2023-01-07 15:31:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jbwdevries/phasm#2
No description provided.