Answer the question
In order to leave comments, you need to log in
How slow is std::initializer_list?
Where is this object created: on the stack or on the heap?
Can it be used to pass parameters to a function that needs to be fast? For example, to access a cell of a multidimensional array class.
Answer the question
In order to leave comments, you need to log in
Slow compared to what? All this performance stuff is a waste of time until you do a full performance test of your entire application. And when it turns out that access to a cell of a multidimensional array class is slowing down, then optimize. Therefore, instead of answering the question, I offer you a simple piece of advice - write as you like, and then optimize.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question