Hacker News new | ask | show | jobs
by nly 37 days ago
Heterogenous containers are a performance killer for all kinds of other reasons.

A vector of variants still wouldn't be optimal. Better to use something like

https://www.boost.org/doc/libs/latest/doc/html/poly_collecti...

2 comments

Yeah, no human would work like that. You wouldn't write a sentence for a letter, then go shopping for a single item, then write another sentence, go shopping again, then flush the toilet ...
> A vector of variants still wouldn't be optimal

Transpose.