Single Header Bullet
https://github.com/g-pechorin/bullet2stripped
What?
I reduced Bullet 2.83 to a single C++ header file.
Why?
Largely to see if I could … hey - SQLite saw a 5% - 10% speed boost when they did this right?
… oh - and to ease adoption I guess … maybe …
How?
I used a slightly complicated Scala script that I’m not interested in examining again … for now …
Basically; I took the 2.83 stripped variant of Bullet and used a Scala program to digest it.
I walked all of the files following the preprocessor #include
commands while sprinkling #line
directives into place to keep the line numbers correct.
I had to force a few bits to happen in a specific order, and there were some trivial functions (two I think) that were declared twice, but I think that it worked.
I certainly passed a “hello world” Bullet test … so it worked for my woefully inadequate testing.
Who?
Anyone who adheres to Sean Barret’s philosophies may be amused by this.
Now?
I’d like to have a smaller version of Bullet to work with.
Smaller footprint, no serialisation, drop the aligned allocators, remove as much virtual
as possible.
… but definitely, keep the option to use double
… cause … y’know ; VR!