Questions asking for "better ways" are very often not well received by our community. You find some of the reasons here, in this meta post from 2019 "Why questions about "the correct way" are too broad".
When one tries to ask such a question either, one has to care for two things:
a clear, measurable criteria what "better" should mean
a convincing argument that the chosen criteria are "the right ones" for achieving a certain goal (and not part of an XY problem.)
Specifically when it comes to performance and/or space efficiency: those are never an end in itself, only a means to an end. When askers state those things as a criterion for "better", they should present their results of performance or space measurements (or at least a serious estimation) and explain why those results don't meet their requirements.
Otherwise, the community here will typically assume the asker has set their priorities wrong (and IMHO that asessment is likely to be correct).