Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HaRepacker] Improve sorting #256

Merged
merged 1 commit into from
Sep 14, 2024
Merged

Conversation

genment
Copy link
Contributor

@genment genment commented Sep 13, 2024

Sorting is now 4x faster with numeric nodes and 3x faster with string nodes.

  • 10k random integer string TreeNode

    • Before: 33 seconds
    • After: 8 seconds
  • String_000.wz/Consume.img (26k+ properties) in GMS v253

    • Before: 323 seconds
    • After: 95 seconds
  • QuestData_000.wz (21k+ images) in GMS v253

    • Before: 127 seconds
    • After: 44 seconds

The Sort() method is automatically called when assigning a new IComparer.

@lastbattle
Copy link
Owner

Interesting, also wasnt aware that the int.TryParse and Convert.ToInt32 is being called twice previously.
Tested! Thanks.

@lastbattle lastbattle merged commit cee8138 into lastbattle:staging Sep 14, 2024
@genment genment deleted the improve-sorting branch September 14, 2024 21:25
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.

2 participants