Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Preliminary alloc free support #4

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Preliminary alloc free support #4

merged 1 commit into from
Jun 10, 2020

Conversation

lmas
Copy link
Owner

@lmas lmas commented Jun 7, 2020

Per #1

goos: linux
goarch: amd64
pkg: github.com/lmas/Damerau-Levenshtein
BenchmarkSimple-4   	   22352	     52824 ns/op	       4 B/op	       0 allocs/op
PASS
coverage: 94.6% of statements

@stapelberg this should be good enough right? ;)
It's not thread safe though and not so sure I want to add that too, feels a bit like over engineering.

@lmas lmas added the enhancement New feature or request label Jun 7, 2020
@stapelberg
Copy link

@stapelberg this should be good enough right? ;)

Thanks for the change! I can confirm that this is a significant speed-up: my benchmark now completes in 40 seconds. For comparison, I tried running the same benchmark without this change, and cancelled it after it still did not complete in >6 minutes!

It's not thread safe though and not so sure I want to add that too, feels a bit like over engineering.

Agreed! Users will probably not mind adding goroutine safety if they need it.

@lmas
Copy link
Owner Author

lmas commented Jun 10, 2020

Done and done, thanks man

@lmas lmas merged commit 88ec43c into master Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants