]> Git — Sourcephile - haskell/symantic-parser.git/commit
add registers
authorJulien Moutinho <julm+symantic-parser@sourcephile.fr>
Sun, 25 Jul 2021 04:43:08 +0000 (06:43 +0200)
committerJulien Moutinho <julm+symantic-parser@sourcephile.fr>
Wed, 28 Jul 2021 04:02:02 +0000 (06:02 +0200)
commite8500432c2febce81572748985b8e549b743b891
tree939cbc70260fba1dd02773e8440014f20981763b
parent171f5e7e0032f3e6458be2f319594ffa38311191
add registers

Symantic.Parser is now faster than Attoparsec on the Brainfuck benchmarks:

```
$ make benchmarks b=Brainfuck/ByteString/hanoi/'*'

benchmarking Brainfuck/ByteString/hanoi/SymanticParser
time                 11.33 ms   (11.18 ms .. 11.51 ms)
                     0.999 R²   (0.998 R² .. 1.000 R²)
mean                 11.12 ms   (11.03 ms .. 11.20 ms)
std dev              219.9 μs   (164.6 μs .. 301.4 μs)

benchmarking Brainfuck/ByteString/hanoi/Attoparsec
time                 15.38 ms   (15.26 ms .. 15.52 ms)
                     0.999 R²   (0.999 R² .. 1.000 R²)
mean                 15.38 ms   (15.29 ms .. 15.49 ms)
std dev              252.1 μs   (184.3 μs .. 363.2 μs)

benchmarking Brainfuck/ByteString/hanoi/Handrolled
time                 1.608 ms   (1.595 ms .. 1.628 ms)
                     0.999 R²   (0.998 R² .. 1.000 R²)
mean                 1.585 ms   (1.575 ms .. 1.596 ms)
std dev              35.75 μs   (26.53 μs .. 51.66 μs)
variance introduced by outliers: 11% (moderately inflated)
```
79 files changed:
Hacking.md
Makefile
benchmarks/Brainfuck.hs
flake.lock
parsers/Parsers/Brainfuck/SymanticParser/Grammar.hs
parsers/Parsers/Brainfuck/inputs/helloworld.bf [deleted file]
parsers/Parsers/Brainfuck/inputs/helloworld_golfed.bf [deleted file]
src/Symantic/Parser/Grammar.hs
src/Symantic/Parser/Grammar/Combinators.hs
src/Symantic/Parser/Grammar/ObserveSharing.hs
src/Symantic/Parser/Grammar/Optimize.hs
src/Symantic/Parser/Grammar/View.hs
src/Symantic/Parser/Grammar/Write.hs
src/Symantic/Parser/Machine.hs
src/Symantic/Parser/Machine/Generate.hs
src/Symantic/Parser/Machine/Input.hs
src/Symantic/Parser/Machine/Instructions.hs
src/Symantic/Parser/Machine/Optimize.hs
src/Symantic/Parser/Machine/Program.hs
src/Symantic/Parser/Machine/View.hs
symantic-parser.cabal
test/Golden/Grammar.hs
test/Golden/Grammar/OptimizeGrammar/G11.expected.txt
test/Golden/Grammar/OptimizeGrammar/G12.expected.txt
test/Golden/Grammar/OptimizeGrammar/G13.expected.txt
test/Golden/Grammar/OptimizeGrammar/G14.expected.txt
test/Golden/Grammar/OptimizeGrammar/G3.expected.txt
test/Golden/Grammar/OptimizeGrammar/G4.expected.txt
test/Golden/Grammar/OptimizeGrammar/G5.expected.txt
test/Golden/Grammar/OptimizeGrammar/G8.expected.txt
test/Golden/Grammar/ViewGrammar/G11.expected.txt
test/Golden/Grammar/ViewGrammar/G12.expected.txt
test/Golden/Grammar/ViewGrammar/G13.expected.txt
test/Golden/Grammar/ViewGrammar/G14.expected.txt
test/Golden/Grammar/ViewGrammar/G3.expected.txt
test/Golden/Grammar/ViewGrammar/G4.expected.txt
test/Golden/Grammar/ViewGrammar/G5.expected.txt
test/Golden/Grammar/ViewGrammar/G8.expected.txt
test/Golden/Machine.hs
test/Golden/Machine/G1.expected.txt
test/Golden/Machine/G10.expected.txt
test/Golden/Machine/G11.expected.txt
test/Golden/Machine/G12.expected.txt
test/Golden/Machine/G13.expected.txt
test/Golden/Machine/G14.expected.txt
test/Golden/Machine/G15.expected.txt
test/Golden/Machine/G16.expected.txt
test/Golden/Machine/G2.expected.txt
test/Golden/Machine/G3.expected.txt
test/Golden/Machine/G4.expected.txt
test/Golden/Machine/G5.expected.txt
test/Golden/Machine/G6.expected.txt
test/Golden/Machine/G7.expected.txt
test/Golden/Machine/G8.expected.txt
test/Golden/Machine/G9.expected.txt
test/Golden/Parser.hs
test/Golden/Parser/G11/P1.expected.txt
test/Golden/Parser/G12/P1.expected.txt
test/Golden/Parser/G3/P1.expected.txt
test/Golden/Parser/G8/P1.expected.txt
test/Golden/Splice.hs
test/Golden/Splice/G1.expected.txt
test/Golden/Splice/G10.expected.txt
test/Golden/Splice/G11.expected.txt
test/Golden/Splice/G12.expected.txt
test/Golden/Splice/G13.expected.txt
test/Golden/Splice/G14.expected.txt
test/Golden/Splice/G15.expected.txt
test/Golden/Splice/G16.expected.txt
test/Golden/Splice/G2.expected.txt
test/Golden/Splice/G3.expected.txt
test/Golden/Splice/G4.expected.txt
test/Golden/Splice/G5.expected.txt
test/Golden/Splice/G6.expected.txt
test/Golden/Splice/G7.expected.txt
test/Golden/Splice/G8.expected.txt
test/Golden/Splice/G9.expected.txt
test/Golden/Utils.hs
test/Grammar.hs