3 ms·
It's interesting how go and python have similar achilles heels, namely the way they handle strings (python's print was highlighted as a similar performance prob
by xarope 4y ago
It's interesting how go and python have similar achilles heels, namely the way they handle strings (python's print was highlighted as a similar performance problem in another post recently in HN). I wonder if there will ever be a solution to this issue (i.e. the marshalling/demarshalling of potential unicode/runes to bytes and vice versa), or are we forever stuck in this tradeoff?
- User23 4y agoThe obvious compromise is ASCII for code and utf8 for data. Although personally I like the idea of applying the function man in a business suit levitating. At least recreationally.
- earthboundkid 4y agoPython printing flushes the buffer. That’s slow in every language.
- masklinn 4y agoIsn’t it just the standard line-buffering of stdout? Print sends a newline by default but i don’t think it flushes explicitly (hence the flush keyword parameter).
- rob74 4y agoI think Go's "everything is UTF-8 unless you really need something different" approach is pretty sensible - it may not be the best for performance, but it saves you a lot of headaches...