Skip to content

Implement #sort_by inside macros using Enumerable#sort_by#14895

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:perf/arrayliteral-sort_by
Aug 15, 2024
Merged

Implement #sort_by inside macros using Enumerable#sort_by#14895
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:perf/arrayliteral-sort_by

Conversation

@HertzDevil
Copy link
Contributor

Ensures that the block in ArrayLiteral#sort_by and TupleLiteral#sort_by is called exactly once for each element, by not using Enumerable#sort under the hood.

Extracted from #14894

@straight-shoota straight-shoota added this to the 1.14.0 milestone Aug 13, 2024
@straight-shoota straight-shoota merged commit 1a243ad into crystal-lang:master Aug 15, 2024
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. and removed performance labels Aug 15, 2024
@HertzDevil HertzDevil deleted the perf/arrayliteral-sort_by branch August 15, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:macros

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants