-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move enum registration / conditional shard Inlining #473
Conversation
The more logical location for registration. Also it generally forces them to be in source files this way. Might also make it easier to add enum help above the register function in the doc branch
Some statistics before/after Full shards sourceWith rm -rf src/core src/extra
time cmake --build . --target shards devel (Debug/Windows)
this branch (Debug/Windows)
Partial rebuild (gfx/gizmos)With pushd src/extra/CMakeFiles/shards-extra.dir; rm -rf gfx gizmos; popd
time cmake --build . --target shards devel (Debug/Windows)
this branch (Debug/Windows)
|
Codecov Report
@@ Coverage Diff @@
## devel #473 +/- ##
==========================================
- Coverage 81.11% 81.09% -0.03%
==========================================
Files 215 218 +3
Lines 28694 28735 +41
==========================================
+ Hits 23275 23302 +27
- Misses 5419 5433 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Well first of all I don't think this was a priority at all, second while nice on paper, I don't think shards will be inlined, C++ works in a very rudimentary way, inline functions have to be headers, anything .cpp gets it's own compilation unit. LTO might work but that's another bet. Also you could have split the work.. enum stuff easy to approve, core runtime nope. |
Maybe you should revert just the inline shards bit, that require valgrind measuring (that's how I implemented them...) before any refactor. 👍 |
Alright let's review it as is since you checked asm and get it out of the way then 👍 |
Let me know when ready to review, add me 🙏 |
Yeah should be good, ran some test script as well (defpure inner
= .i
.i (Math.Add 2))
(defwire test
0 >= .v
[] >= .seq
(ForRange 0 10000000 (->
>= .av
.v (Math.Add .av) > .v
.v (Do inner) > .v
.v >> .seq))
.v)
(defmesh root)
(schedule root test)
(if (run root) nil (throw "Root tick failed")) Same timings comparing to devel, there's not that many inline shards and this should at least touch some to indicate that they're still inlined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Couldn't help it, I spent some extra time on improving build iteration times & cleaning up some of the enum registration.
It ties in a bit to my #472 branch too because I can move the enum help strings the source file too.