Branch: refs/heads/main
Revision: f231291
Author: bradcray
Link: Fasta edits based on perf review by bradcray · Pull Request #19635 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19635 from bradcray/fasta-perf-review
Fasta edits based on perf review
[reviewed by, and based on suggestions from, Engin]
This incorporates some changes to my latest fasta versions based on
feedback from the perf team today. Changes include:
- changing from
[0]
to get the first byte of a string to.toByte()
to avoid a subtle idiom - changing from bytes literals to string literals for cleanliness after
making the previous change - replacing the array-based buffer in
repeatMake()
with abytes
variable for a nice clarity improvement that doesn't seem to hurt
performance on my Mac. - giving Engin credit on the byline for the bytes suggestion
- swapping the order of the influences since I ended up learning so
much from the gcc # 9 version.
This version is competitive with the previous on main
(maybe
slightly faster, but it seems virtually in the noise), and is slightly more
compact, from 1134 down to 1104, bringing us within 1.5x of the
most compact (Ruby) entry.
Modified Files:
M test/studies/shootout/fasta/bradc/fasta-blc.chpl
Compare: https://github.com/chapel-lang/chapel/compare/dba0452d0acb...f231291d568e