Skip to content

Commit

Permalink
Merge pull request #5 from rmg/go-buffer-size
Browse files Browse the repository at this point in the history
go: adjust buffer size
  • Loading branch information
rmg authored Mar 21, 2023
2 parents a335306 + 6273e35 commit 23cd229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ implementations compare to each other.
|------|------|------|--------|
| grep | 0m18.034s | 0m15.713s | 0m2.257s |
| ripgrep | 0m1.709s | 0m1.541s | 0m0.147s |
| simple (Go) | 0m1.889s | 0m1.679s | 0m0.211s |
| simple (Go) | 0m1.737s | 0m1.594s | 0m0.142s |
| simple (Rust) | 0m1.461s | 0m1.325s | 0m0.131s |
| simple (Node) | 0m6.458s | 0m6.043s | 0m0.627s |
| custom (C) | **0m0.222s** | **0m0.079s** | **0m0.141s** |
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -24,7 +24,7 @@ import (
"runtime/pprof"
)

const BUF = 64 * 1024 * 1024
const BUF = 64 * 4096

func searchWrite(buf []byte, out io.Writer) int {
count := 0
Expand Down

0 comments on commit 23cd229

Please sign in to comment.