#1 Improve performance by using more sets

Merged
Darks merged 1 commits from :master into master 1 year ago

Most of the program currently uses lists and tends to check list members with in, which is much more efficient with sets. Also two functions manipulate a set of black pixels, with subset and set difference operations, implemented from lists.

This pull requests replaces many list structures with sets, and normalizes lines by sorting the tuples. This significantly improves performance, with speedups ranging from 10x to 50x, and removes the need for duplicate removal.

See Utiliser le Sprite Optimizer (#165850) for more details.

Most of the program currently uses lists and tends to check list members with `in`, which is much more efficient with sets. Also two functions manipulate a set of black pixels, with subset and set difference operations, implemented from lists. This pull requests replaces many list structures with sets, and normalizes lines by sorting the tuples. This significantly improves performance, with speedups ranging from 10x to 50x, and removes the need for duplicate removal. See [Utiliser le Sprite Optimizer (#165850)](https://www.planet-casio.com/Fr/forums/lecture_sujet.php?id=15315&page=last#165850) for more details.
Darks approved these changes 1 year ago
Darks closed this pull request 1 year ago
The pull request has been merged as 621bfa41df.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.