forked from JuliaLang/julia
-
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.
convert some typeof tags to small integers
The value here is two-fold. One, we speed up sysimg load times slightly, since we can entirely skip relocations for these values and avoid faulting in some writable pages. This should let us (later) move more content into the ConstData section, such as String objects. Secondly, some type-manipulation native code becomes simpler, since it is based on small consecutive constants instead of requiring extra pointer loads to check for pointer identity. This is similar to the existing small-union optimization, but for type tags, and only for specific ones. This makes use of the fact that the zero page (about 4096 byes) cannot be allocated in the usual C memory model, which lets us define up to 255 of these special types, after taking into account the 4 gc bits. As a current implementation limitation for performance, these cannot be parametric types. Note there are probably more places in Base that can be updated to use `jl_typetagof` instead of `jl_typeof`, where we know if it is a type or tag. For example, this optimize most of builtins.c file, except for the `jl_object_id` function.
- Loading branch information
Showing
38 changed files
with
937 additions
and
653 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
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
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
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
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
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
Oops, something went wrong.