Skip to content

Declare your Swift variables using a Macro for optimal Memory Layout.

License

Notifications You must be signed in to change notification settings

RandomHashTags/swift-optimal-memory-layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorts stored property declarations in the optimal layout so they don't waste memory.

Requires at least Swift 5.9 Apache 2.0 License

Limitations

Current limitations of Swift Macros doesn't enable this library to support custom objects, only values found in the Standard Library (and Foundation).

However, it does support custom objects but you have to supply the literal memory layout (no reference or stored value) using the correct macro.

This library organizes custom objects at the bottom, just above objects that have a 1,1,1 (alignment,size,stride) memory layout.

About

Declare your Swift variables using a Macro for optimal Memory Layout.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages