Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
38
10 months ago
|
parent
|
context
|
favorite
| on:
Optimizing Heap Allocations in Go: A Case Study
instead of this:
t.Buf = []byte{}
you can just do:
t.Buf = nil
rsc
10 months ago
[–]
Those are semantically different (one is nil and one is not) but neither allocates.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: