forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
list<u8>
lifting and lowering (bytecodealliance#6971)
This commit optimizes the lifting and lowering routines for `list<u8>` and other similar primitive integer types. The current lifting/lowering is intended to be general-purpose and correct but doesn't optimize well with LLVM for a number of reasons. I first attempted to reshape the general-purpose code to be easier for LLVM to optimize but in the end was unable to convince LLVM that various pointers here don't alias which meant that the general-purpose lowering/lifting never optimized well. Instead, however, I've added new trait methods which are implemented the same way as the general purpose methods beforehand. The integer/primitive implementations overwrite these implementations with more specialized versions given knowledge of primitives. On a local benchmark this makes lifting/lowering disappear from a profile since memcpy is generally much faster than per-item processing.
- Loading branch information
1 parent
432b547
commit 289e6af
Showing
1 changed file
with
95 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters