How Bochs Works Under the Hood (2012) [pdf]
bochs.sourceforge.net
bochs.sourceforge.net
As a curiosity, I tried NT4 under Bochs and Unreal Engine based games worked well... albeit at 3-4 FPS. That emulated under an AMD Turion64 from ~2005-6.
Bochs emulates a VooDoo and 2/3 are WIP, so in a near future it mayb be an easier to setup alternative to PCE/Box86.
A Ryzen probably will be able to push Deus Ex under Bochs with no issues at all.
>"In order to reduce the complexity a bit, all the decoding of the operand fields is done first and then the instruction is executed by one of many hundred small methods that don't have to care(much) about their operands."
I'm confused by this, the operands are decoded first and then the op code is decoded? Or am I reading this incorrectly?
That’s certainly an interesting sentiment in 2012…
On the other hand, this often causes a huge increase in code size, which means less code can fit in the instruction cache, and - even worse - when the system is on the verge of swapping, can make performance drop even faster. It's unfortunate that microbenchmarks often tend to favour such globally-inefficient code that's only slightly faster in isolation but bogs down the system as a whole.
This article is related: https://news.ycombinator.com/item?id=18777735
- A C++ compiler cannot do speculative devirtualization. Which hurts if you split everything into small virtual functions.
- If you are churning through lots of small allocations and aren't maxing all CPU cores, a garbage collector running in parallel is nearly free - unlike the bookkeeping your C++ deallocations have to go through.
Yes, it can! For example: https://godbolt.org/z/-JtSiJ