Skip to content

Conversation

j0ru
Copy link

@j0ru j0ru commented May 17, 2024

This patch allows the different indexes to be toggled since they contribute significantly to compile time and for many applications not all three are needed. Additionally, the entry-or_insert pattern was replaced by building the HashMap from a slice, reducing the compile time even more.

Behavioral Change: If the index contains multiple entries with the same key, the last one is used instead of the first one. This is because the entries are consumed from a vec, which causes duplicated keys to be overwritten, instead of skipping them. If this is considered as a blocker for this PR, reversing the list of records before generating the code should resolve that. Since this scenario wasn't included in the tests and reversing the list could mean extra effort, I left that out for now.

This patch allows the different indexes to be toggled since they
contribute significantly to compile time and for many applications not
all three are needed.
Additionally the entry-or_insert pattern was replaced by building the
HashMap from a slice, reducing the compile time even more.
@j0ru
Copy link
Author

j0ru commented May 17, 2024

For context, the original build took (on my kinda slow laptop) a bit over 4 minutes, and this broke it down to about 20 seconds in a cold built (with all newly added feature options enabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant