This amount of overhead may be acceptable, as you'd only use transactional variables for shared globally-visible state (like properties of game objects) and not locals. If performance is dominated by low-level operations like collision detection, this may be negligible.
-
-
Show this thread
-
For comparison, UE3 UnrealScript and pre-il2cpp Unity Mono bytecode interpretation were ~30x slower than native.
Show this thread -
One great side-effect of transactions is that you can automatically undo variable writes upon failure, for example so you can write something like "if(move a bunch of actors) ... else ...", and if any operations fail, then all of their effects are undone.
Show this thread -
I've had to re-learn my code optimization intuition from the late 90's. C++ compiler optimization is magic now, and Skylake can reliably issue 4-6 instructions per clock. But control flow misprediction has become wildly expensive.
Show this thread -
Anyway, there are two competing theories on how we'll unlock higher performance through parallelism. One is the data oriented design approach, asking programmers to rewrite gameplay code as highly parallel fragments of algorithms that pipe inputs and outputs among stages.
Show this thread -
The other is transactions, hoping we can just write gameplay code using "var<int> Health;" instead of "int health;", write code to minimize unnecessary contention for shared state, and have the engine and API magically sort out concurrency for us.
Show this thread
End of conversation
New conversation -
-
-
This Tweet is unavailable.
-
TSX is nearly constant 40-clock overhead hardware transactional memory for small-ish transactions touching a few cache lines, detecting conflicts at cache line granularity and not guaranteeing progress. Wouldn't work for something like a Fortnite gameplay object update.
End of conversation
-
-
-
Would it be similar to https://wg21.link/p1875 but with a library? Or is the feature different?
-
The C++ proposal would expose hardware transactions and a software emulation layer that would wrap all mutable reads and writes in framework code to assist with transactions. What's hard is making this fast when the compiler doesn't know what state is local vs global.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.