3 ms·
Is this only for constants or even for instructions? Like: a=fooMethod(); b=otherMethod() Will this be reordered?
by Fire-Dragon-DoL 8mo ago
Is this only for constants or even for instructions?
Like:
a=fooMethod(); b=otherMethod()
Will this be reordered?
- vardump 8mo agoDepends on the processor's store queue. It might be. Of course if otherMethod() is anything more complicated, 'a' will almost certainly be assigned first. Of course you should still do the order dependent assignment correctly, like by using C++ std::memory_order or atomics.