-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Given that it's unlikely this crate will ever need to generate class files. A very nice optimization that's possible is memory mapping the class file. This would essentially remove all branches that occur while reading class files. I got the idea from harfbuzz and fontations.
This choice does however make writing either complicated by requiring the use of a builder pattern, or slow by requiring explicit memory moves every write operation.
Largest scope of this project includes modification of the class files to allow diff-patching their bytecode though this is unlikely to be implemented in foreseeable future.
This is also not a priority until decompilation is on par with other decompilers. Current class file reading performance isn't the worst.
Fontations are a good example of how to do this. Ideally this feature should be implemented alongside a specification parser to ensure parsing code matches the spec exactly.