Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize match checking to avoid layout queries
In code with large, single-value match statements, we were previously spending a lot of time running layout_of for the primitive types (integers, chars) -- which is essentially useless. This optimizes the code to avoid those query calls by directly obtaining the size for these types, when possible. We fallback to the (slower) previous code if that fails, so this is not a behavior change.
- Loading branch information