You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #273 and #347 we have optimized several functions by essentially performing static argument transformations by hand. The functions below look like good candidates to attempt similar optimizations.
In #273 and #347 we have optimized several functions by essentially performing static argument transformations by hand. The functions below look like good candidates to attempt similar optimizations.
unfoldrN
: (Done in Hand SAT optimization for Data.ByteString.unfoldrN #356) I believe we could float out thep
argument and usen
as the offset to use withpokeByteOff
.bytestring/Data/ByteString.hs
Lines 868 to 878 in c470cf2
partition
: In thesep
andrev
loops,p2
could be computed fromp1
. Alternatively, both memory locations could be tracked via a single offset.bytestring/Data/ByteString.hs
Lines 1477 to 1507 in c470cf2
hGetLine.findEOL
: It might be worthwhile to float out thew
andraw
arguments.bytestring/Data/ByteString.hs
Lines 1846 to 1852 in c470cf2
Char8.readInt.digits
: Thep
andb
arguments are always incremented in sync, which indicates that one could be made static and floated out.bytestring/Data/ByteString/Char8.hs
Lines 1056 to 1071 in c470cf2
Lazy.Char8.readInt.digits
: Same situation as in the strict versionbytestring/Data/ByteString/Lazy/Char8.hs
Lines 877 to 892 in c470cf2
packZipWith.zipWith_
: Ther
argument could be floated out. @Boarders points out that this doesn't always improve performance though: Try optimizing loops inData.ByteString.findIndex[End]
in the style of #273 #338 (comment). Investigating this might be worthwhile though.bytestring/Data/ByteString.hs
Lines 1667 to 1684 in c470cf2
Short.partition.go.go'
:bw2 = br - bw1
The text was updated successfully, but these errors were encountered: