560 karma · joined Jul 8, 2010 (16y ago) · 134 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 14y ago · link · parent
Maybe it's a matter of training, but
@_update_status_position(e, files)
looks much clearer to me than @_update_status_position e, filescomment 14y ago · link · parent
comment 14y ago · link · parent
comment 14y ago · link · parent
comment 14y ago · link · parent
comment 14y ago · link · parent
Ah, yeah, I was testing a much much smaller byte array with multiple split points. I'm not terribly surprised that in your case you've found the hand-coded byte version to be faster (though the difference is more than I would've guessed; care to post the code?) However, I'm still not sure it's merited in the standard library. Split() could pretty easily be further specialized to basically call your single byte implementation or equivalent at the cost of a handful of instructions per call. Alternately, if you know you're dealing with very large byte slices with only a few split points, it is only a couple lines of code to write a specialized version that is tuned for that. The same argument could be make for IndexByte, but I'd claim that IndexByte is a much more fundamental operation in which one more often has need for a hand-tuned assembly implementation. I wouldn't say the same for Split. There's a benefit to having fewer speed-specialized standard library calls, and I don't think splitting on a byte with performance as a primary concern happens often enough to merit another way to split on a byte in the standard library. But I'm certain that reasonable people who are smarter than me would disagree.
comment 14y ago · link · parent
I think they made the right choice there; the Go team seems very good about optimizing only where it matters; there's lots of low hanging fruit, but the majority of it isn't very useful fruit.
comment 14y ago · link · parent
comment 14y ago · link · parent
That and similar type-specific handling could be built into the json package fairly easily, and would make those cases quite a bit faster. Then again, I bet the Go team would have a better and more general idea.
comment 14y ago · link · parent
I do wish the Thrift support was as good as the protocol buffer support, though. :)
comment 14y ago · link · parent
"You retain full ownership to your stuff. We don’t claim any ownership to any of it."
Or am I missing something?