fast-replace/go-fast-replace
pxi c669dfb264 (*-ω-)ω-*) 2023-12-30 22:40:16 +01:00
..
cmd ¯\_(ツ)_/¯ 2023-12-30 22:35:09 +01:00
csv ¯\_(ツ)_/¯ 2023-12-30 22:35:09 +01:00
internal ¯\_(ツ)_/¯ 2023-12-30 22:35:09 +01:00
Makefile (*-ω-)ω-*) 2023-12-30 22:40:16 +01:00
README.md ¯\_(ツ)_/¯ 2023-12-30 22:35:09 +01:00
go.mod ¯\_(ツ)_/¯ 2023-12-30 22:35:09 +01:00

README.md

Go Fast Replace

An implementation in Go.

To build

make build

To run

make run

To test

make test

Conclusions

Replace

Current implementations:

Results

  • bm varies a lot, but is never over 460µs.
  • cw is a lot slower, at around 3.5ms, but it can search for multiple patterns at once.
$ make run
./bin/corpus
Creating corpus...
./bin/pairs
Creating pairs...
./bin/replace

bm: 273.621µs

cw: 2.939254ms

Todo: