-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer symbols for VarNames over strings
Both are valid and allowed and will remain so. But using symbols overall avoids a bunch of allocations, so it makes sense to adjust our internal code as well as user-facing documentation to use symbols to set a good precedent. To demonstrate the effect, here a benchmark with strings: julia> @Btime polynomial_ring(QQ, ["x", "y"]); 756.274 ns (27 allocations: 1.22 KiB) Here the same with symbols: julia> @Btime polynomial_ring(QQ, [:x, :y]); 535.963 ns (20 allocations: 896 bytes) Of course code where this noticeable would be code that calls polynomial_ring far too many times, and should be changed to not do *that*.
- Loading branch information
Showing
31 changed files
with
233 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.