jamesdbrock / replace-benchmark

Benchmarks for replace-megaparsec and replace-attoparsec
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

GHC 9 performance #7

Open jamesdbrock opened 1 year ago

jamesdbrock commented 1 year ago

Performance difference from GHC v8.10.7 to GHC v9.4.4 varies for different cases. Performance seems slightly worsen.

GHC v8.10.7

Program dense ms sparse ms
Replace.Megaparsec.streamEdit String 3331.33 2945.07
Replace.Megaparsec.streamEdit ByteString 3720.18 435.71
Replace.Megaparsec.streamEdit Text 4148.22 936.32
Replace.Attoparsec.ByteString.streamEdit 2746.39 254.86
Replace.Attoparsec.Text.streamEdit 3595.66 308.04
Replace.Attoparsec.Text.Lazy.streamEdit 2773.35 338.35
Text.Regex.Applicative.replace String 12779.26 4406.75
Text.Regex.PCRE.Heavy.gsub Text 111.43
Control.Lens.Regex.ByteString.match 113.49
Control.Lens.Regex.Text.match 34.83

GHC v9.4.4

Program dense ms sparse ms
Replace.Megaparsec.streamEdit String 3267.20 2883.93
Replace.Megaparsec.streamEdit ByteString 4064.84 756.71
Replace.Megaparsec.streamEdit Text 4119.75 906.57
Replace.Attoparsec.ByteString.streamEdit 3226.64 178.86
Replace.Attoparsec.Text.streamEdit 3405.49 312.29
Replace.Attoparsec.Text.Lazy.streamEdit 3107.39 242.20
Text.Regex.Applicative.replace String 13820.86 4364.59
Text.Regex.PCRE.Heavy.gsub Text 113.66
Control.Lens.Regex.ByteString.match 115.43
Control.Lens.Regex.Text.match 35.65