Viewing profile — mwsherman
mwsherman
HN member- Joined
- Tue, Jul 21, 2009, 12:39 AM UTC
- HN karma
- 3,607
- Public activity
- 667 items
- HN profile
- View on Hacker News ↗
About mwsherman
Recent public activity
-
comment
Comment #49022708
I recommend starting with SWAR [1] before SIMD. Our registers are typically 64 bits, and one can try out SIMD patterns without taking a dependency on particular hardware. This will…
-
comment
Comment #46504238
While this article is about perf — and trading off semantic precision by design — there is a Unicode standard for sentence boundaries, may be interesting: https://www.unicode.org/r…
-
comment
Comment #46232489
Shameless plug, if one wishes to track down allocations in Go, an allocations explorer for VS Code: https://marketplace.visualstudio.com/items?itemName=Clipperh...
-
comment
Comment #46231657
I’ve found C#’s frozen dictionary to be useful: https://learn.microsoft.com/en-us/dotnet/api/system.collecti... It’s optimized for fast reads in exchange for expensive creation.
-
comment
Comment #45670870
That’s true, converting in either direction will typically allocate. Which it must, semantically. One can use unsafe for a zero-copy conversion, but now you are breaking the semant…
-
comment
Comment #45670197
There is mention of how len() is bytes, not “characters”. A further subtlety: a rune (codepoint) is still not necessarily a “character” in terms of what is displayed for users — th…
-
comment
Comment #45670075
In Go, string effectively serves as a read-only slice, if we are talking about bytes. ReadOnlySpan in C# is great! In my opinion, Go essentially designed in “span” from the start.
- story
-
comment
Comment #45563029
A Go allocations explorer for VS Code. Extension: https://marketplace.visualstudio.com/items?itemName=Clipperh... Source: https://github.com/clipperhouse/go-allocations-vsix
-
comment
Comment #45533460
Shameless plug, you may wish to do Lucene-style tokenizing using the Unicode standard: https://github.com/clipperhouse/uax29/tree/master/words
-
comment
Comment #45426021
I move between Go and C#. I wrote a zero-allocation package in Go [1] and then ported to C# — and the allocations exploded! I had forgotten, or perhaps never realized, that substri…
-
story
Show HN: Go Allocations Explorer for VS Code
I’ve learned that my intuitions about where an allocation is coming from aren’t always correct. One tracks it down by creating a -memprofile then go tool pprof, and then some searc…
- story
- story
- story
-
comment
Comment #45040493
Putting on eng manager hat, the problem to solve is that this regression went undetected, not that Safari is slow. The solution is a test that fails when Chrome and Safari have sub…
-
story
Show HN: A more composable rate limiter for Go
Having seen how complex rate limiting becomes in production, I thought layering should be more expressible.
- story
- story
- story
-
comment
Comment #44277625
C# has implemented some SIMD for IndexOf: https://github.com/dotnet/runtime/pull/63285
- story
- story
- story
-
comment
Comment #41883692
Here’s a way to write tests next to the code: https://clipperhouse.com/go-test-csharp/ (Whether I recommend it, not sure! I did it and then undid it, with suspicion that tests were…