Skip to content
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

Add bench compare script #571

Merged
merged 6 commits into from
Aug 24, 2023
Merged

Add bench compare script #571

merged 6 commits into from
Aug 24, 2023

Conversation

gkjohnson
Copy link
Owner

No description provided.

@gkjohnson
Copy link
Owner Author

gkjohnson commented Aug 24, 2023

BVH Casts

before after delta increase
Raycast
*  max 0.17412 ms 2.55375 ms 2.37963 ms 1366.61920 %
IntersectsBox
*  max 0.07600 ms 0.40188 ms 0.32587 ms 428.78226 %
Full Benchmark

BVH General

before after delta increase
Serialize
   mean 0.94300 ms 0.88724 ms -0.05576 ms -5.91294 %
   median 0.91104 ms 0.87077 ms -0.04027 ms -4.42028 %
   min 0.62383 ms 0.57121 ms -0.05262 ms -8.43574 %
   max 4.07688 ms 1.23696 ms -2.83992 ms -69.65914 %
Desrialize
   mean 0.11306 ms 0.11700 ms 0.00394 ms 3.48901 %
   median 0.11258 ms 0.11365 ms 0.00106 ms 0.94333 %
   min 0.11038 ms 0.10642 ms -0.00396 ms -3.58605 %
   max 0.20004 ms 0.24025 ms 0.04021 ms 20.09977 %

BVH Casts

before after delta increase
Compute BVH
   mean 122.63664 ms 122.60688 ms -0.02976 ms -0.02427 %
   median 121.67254 ms 122.13321 ms 0.46067 ms 0.37861 %
   min 114.29467 ms 114.45721 ms 0.16254 ms 0.14221 %
   max 142.94183 ms 134.45088 ms -8.49096 ms -5.94015 %
Raycast
   mean 0.00431 ms 0.00810 ms 0.00379 ms 87.98463 %
   median 0.00425 ms 0.00313 ms -0.00112 ms -26.46976 %
   min 0.00250 ms 0.00187 ms -0.00063 ms -25.00477 %
*  max 0.17412 ms 2.55375 ms 2.37963 ms 1366.61920 %
Raycast First Hit
   mean 0.00197 ms 0.00153 ms -0.00044 ms -22.27698 %
   median 0.00192 ms 0.00146 ms -0.00046 ms -23.94130 %
   min 0.00167 ms 0.00121 ms -0.00046 ms -27.49195 %
   max 0.01867 ms 0.01788 ms -0.00079 ms -4.24290 %
Sphere Shapecast
   mean 0.00771 ms 0.00551 ms -0.00220 ms -28.52329 %
   median 0.00667 ms 0.00500 ms -0.00167 ms -25.00402 %
   min 0.00283 ms 0.00458 ms 0.00175 ms 61.77151 %
   max 1.04192 ms 0.09567 ms -0.94625 ms -90.81827 %
IntersectsSphere
   mean 0.00588 ms 0.00510 ms -0.00078 ms -13.27672 %
   median 0.00596 ms 0.00483 ms -0.00112 ms -18.87393 %
   min 0.00254 ms 0.00425 ms 0.00171 ms 67.24995 %
   max 0.06963 ms 0.07367 ms 0.00404 ms 5.80526 %
IntersectsBox
   mean 0.00740 ms 0.00692 ms -0.00049 ms -6.55886 %
   median 0.00367 ms 0.00317 ms -0.00050 ms -13.63415 %
   min 0.00358 ms 0.00304 ms -0.00054 ms -15.09848 %
*  max 0.07600 ms 0.40188 ms 0.32587 ms 428.78226 %
DistanceToGeometry w/ BVH
   mean 109.99194 ms 108.57009 ms -1.42185 ms -1.29269 %
   median 110.06192 ms 108.62454 ms -1.43737 ms -1.30597 %
   min 109.26988 ms 107.87996 ms -1.38992 ms -1.27200 %
   max 112.00979 ms 110.67217 ms -1.33763 ms -1.19420 %
DistanceToPoint
   mean 0.10718 ms 0.11226 ms 0.00509 ms 4.74532 %
   median 0.10479 ms 0.11083 ms 0.00604 ms 5.76576 %
   min 0.10429 ms 0.11021 ms 0.00592 ms 5.67345 %
   max 1.11692 ms 0.63992 ms -0.47700 ms -42.70687 %
IntersectsGeometry w/ BVH
   mean 2.96538 ms 2.95752 ms -0.00787 ms -0.26526 %
   median 2.94904 ms 2.94292 ms -0.00612 ms -0.20769 %
   min 2.93938 ms 2.93175 ms -0.00763 ms -0.25941 %
   max 4.05196 ms 3.83563 ms -0.21633 ms -5.33897 %
IntersectsGeometry w/o BVH
   mean 20.98982 ms 20.77912 ms -0.21070 ms -1.00380 %
   median 20.86575 ms 20.74944 ms -0.11631 ms -0.55743 %
   min 20.82658 ms 20.70346 ms -0.12313 ms -0.59119 %
   max 46.47312 ms 22.91308 ms -23.56004 ms -50.69606 %

BVH Misc

before after delta increase
Refit
   mean 14.86995 ms 14.91705 ms 0.04710 ms 0.31672 %
   median 14.86300 ms 14.87948 ms 0.01648 ms 0.11088 %
   min 14.76942 ms 14.79058 ms 0.02117 ms 0.14331 %
   max 15.42254 ms 30.35079 ms 14.92825 ms 96.79500 %
Refit with Hints
   mean 0.50133 ms 0.50180 ms 0.00047 ms 0.09402 %
   median 0.50060 ms 0.49954 ms -0.00106 ms -0.21246 %
   min 0.49492 ms 0.49179 ms -0.00313 ms -0.63165 %
   max 0.58288 ms 0.60987 ms 0.02700 ms 4.63220 %
Compute Bounds
   mean 0.00067 ms 0.00056 ms -0.00010 ms -15.35638 %
   median 0.00063 ms 0.00054 ms -0.00008 ms -13.29392 %
   min 0.00058 ms 0.00050 ms -0.00008 ms -14.23313 %
   max 0.02287 ms 0.02392 ms 0.00104 ms 4.55576 %
Compute Bounds w/o
   mean 1.32017 ms 1.36057 ms 0.04039 ms 3.05980 %
   median 1.31758 ms 1.35435 ms 0.03677 ms 2.79083 %
   min 1.31383 ms 1.32763 ms 0.01379 ms 1.04968 %
   max 1.55250 ms 1.44533 ms -0.10717 ms -6.90280 %

Math Functions

before after delta increase
IntersectTri w/o Target
   mean 0.00058 ms 0.00048 ms -0.00010 ms -17.10613 %
   median 0.00058 ms 0.00046 ms -0.00012 ms -21.28399 %
   min 0.00054 ms 0.00042 ms -0.00013 ms -23.11591 %
   max 0.00333 ms 0.00242 ms -0.00092 ms -27.51171 %
IntersectTri w/ Target
   mean 0.00075 ms 0.00062 ms -0.00013 ms -17.57087 %
   median 0.00071 ms 0.00058 ms -0.00013 ms -17.75685 %
   min 0.00067 ms 0.00054 ms -0.00012 ms -18.73101 %
   max 0.01671 ms 0.01142 ms -0.00529 ms -31.67124 %
IntersectTri w/ Update
   mean 0.00123 ms 0.00096 ms -0.00027 ms -21.99038 %
   median 0.00117 ms 0.00096 ms -0.00021 ms -17.90786 %
   min 0.00108 ms 0.00087 ms -0.00021 ms -19.19859 %
   max 0.02008 ms 0.00796 ms -0.01212 ms -60.36956 %

Tower Case Geometry

before after delta increase
CENTER raycast
   mean 0.00711 ms 0.00645 ms -0.00066 ms -9.32129 %
   median 0.00581 ms 0.00488 ms -0.00094 ms -16.12744 %
   min 0.00300 ms 0.00275 ms -0.00025 ms -8.33267 %
   max 0.05754 ms 0.06671 ms 0.00917 ms 15.93138 %
AVERAGE raycast
   mean 0.00245 ms 0.00247 ms 0.00002 ms 0.61413 %
   median 0.00225 ms 0.00217 ms -0.00008 ms -3.69272 %
   min 0.00217 ms 0.00196 ms -0.00021 ms -9.55971 %
   max 0.05904 ms 0.06896 ms 0.00992 ms 16.79663 %
SAH raycast
   mean 0.01204 ms 0.01334 ms 0.00130 ms 10.82382 %
   median 0.00733 ms 0.00892 ms 0.00158 ms 21.60275 %
   min 0.00483 ms 0.00596 ms 0.00112 ms 23.27710 %
   max 0.81504 ms 1.18946 ms 0.37442 ms 45.93842 %

@gkjohnson gkjohnson merged commit 7bace4c into master Aug 24, 2023
3 checks passed
@gkjohnson gkjohnson deleted the bench-compare branch August 24, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant