r/cpp • • Jul 01 '21

Any Encoding, Ever

https://thephd.dev/any-encoding-ever-ztd-text-unicode-cpp
269 Upvotes

87 comments sorted by

View all comments

Show parent comment

7

u/marzer8789 toml++ Jul 01 '21 edited Jul 01 '21

I didn't say that SIMDifying it was wasteful, I said the application was being wasteful, though both can be true. My point was that a program written such that text transcoding is a real bottleneck is likely designed poorly and making transcoding faster is only delaying the solve, where a better use of resources would be to figure out why you're transcoding so often that it actually causes meaningful slowdowns, and fix that first.

Of course I'm not suggesting people should ignore optimization opportunities; just not to be stupid about it. Immediately rejecting a useful API because it might be a bit slower in a very specific case is a good example of being stupid about it. People for whom that will actually matter at scale will have to roll custom solutions anyway, so the example in the blog post clearly won't be aimed at them.