-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve performance for text detection (#532)
This commit improves memory allocations inside nd-json by using a scanLines function that works with already allocated buffer. Previous version of code was using bufio.Scanner which allocates his own copy of the buffer. before: BenchmarkText/application/x-ndjson-8 663314 2027 ns/op 4306 B/op 6 allocs/op after: BenchmarkText/application/x-ndjson-8 1930292 678.6 ns/op 160 B/op 4 allocs/op
- Loading branch information
1 parent
bc511b8
commit ff4d3d0
Showing
4 changed files
with
131 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters