Skip to content

PlotMethod4: A New Hope #4213

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

Merged
merged 36 commits into from
May 9, 2025
Merged

PlotMethod4: A New Hope #4213

merged 36 commits into from
May 9, 2025

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented May 9, 2025

🍐 In-game experiments indicate that the performance goes from 20 fps to 40 fps. Benchmarks show roughly a 2× speedup:

Run on (48 X 3793 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x24)
  L1 Instruction 32 KiB (x24)
  L2 Unified 512 KiB (x24)
  L3 Unified 32768 KiB (x4)
--------------------------------------------------------------------------------------------------
Benchmark                                                        Time             CPU   Iterations
--------------------------------------------------------------------------------------------------
BM_PlanetariumPlotMethod3/NearPolarPerspectiveECI             7.11 ms         7.12 ms           90 16211 points within -1.49365 ± 7028.58 × 3.70166 ± 7029.11 × -0.0446205 ± 77.5489
BM_PlanetariumPlotMethod4/NearPolarPerspectiveECI             3.92 ms         3.91 ms          172 8763 points within -1.45679 ± 7028.54 × 3.74756 ± 7029.07 × -0.0327225 ± 77.5256
BM_PlanetariumPlotMethod3/FarPolarPerspectiveECI              2.95 ms         2.98 ms          236 7408 points within -1.36987 ± 7028.41 × 3.62988 ± 7029.06 × -0.0498848 ± 77.5392
BM_PlanetariumPlotMethod4/FarPolarPerspectiveECI              1.68 ms         1.65 ms          407 4003 points within -1.51318 ± 7028.57 × 3.6626 ± 7028.97 × -0.0421295 ± 77.5383
BM_PlanetariumPlotMethod3/NearEquatorialPerspectiveECI        11.6 ms         11.7 ms           75 20150 points within -1.51196 ± 7028.61 × 4.06958 ± 7028.77 × -0.0441666 ± 77.5434
BM_PlanetariumPlotMethod4/NearEquatorialPerspectiveECI        5.61 ms         5.58 ms          112 11057 points within -2.30957 ± 7027.73 × 4.86353 ± 7028.01 × -0.0536003 ± 77.5363
BM_PlanetariumPlotMethod3/FarEquatorialPerspectiveECI         2.64 ms         2.65 ms          224 5915 points within -1.83716 ± 7026.9 × 14.916 ± 7016.15 × -0.0450745 ± 77.5429
BM_PlanetariumPlotMethod4/FarEquatorialPerspectiveECI         1.63 ms         1.61 ms          407 3308 points within -4.95557 ± 7023.55 × 4.02563 ± 7025.91 × -0.0381889 ± 77.3993
BM_PlanetariumPlotMethod3/NearPolarPerspectiveECEF           0.869 ms        0.872 ms          896 1406 points within 4623.84 ± 315.929 × 5279.21 ± 274.064 × -0.0604935 ± 77.2085
BM_PlanetariumPlotMethod4/NearPolarPerspectiveECEF           0.555 ms        0.562 ms         1000 791 points within 4623.92 ± 315.848 × 5279.21 ± 274.064 × 0.417782 ± 77.0842
BM_PlanetariumPlotMethod3/FarPolarPerspectiveECEF            0.113 ms        0.112 ms         6400 202 points within 4624.78 ± 314.986 × 5279.21 ± 274.064 × -0.903881 ± 73.813
BM_PlanetariumPlotMethod4/FarPolarPerspectiveECEF            0.022 ms        0.022 ms        32000 38 points within 4624.78 ± 314.986 × 5279.21 ± 274.064 × 1.59408 ± 73.3811
BM_PlanetariumPlotMethod3/NearEquatorialPerspectiveECEF       1.29 ms         1.31 ms          560 2256 points within 4623.84 ± 315.926 × 5279.21 ± 274.064 × -0.13179 ± 77.4645
BM_PlanetariumPlotMethod4/NearEquatorialPerspectiveECEF      0.820 ms        0.816 ms          747 1279 points within 4623.84 ± 315.932 × 5279.21 ± 274.064 × 0.168537 ± 77.2224
BM_PlanetariumPlotMethod3/FarEquatorialPerspectiveECEF       0.472 ms        0.481 ms         1493 678 points within 4623.86 ± 315.912 × 5279.21 ± 274.064 × 0.57795 ± 76.9242
BM_PlanetariumPlotMethod4/FarEquatorialPerspectiveECEF       0.181 ms        0.180 ms         3733 199 points within 4624.35 ± 315.417 × 5279.21 ± 274.064 × -0.0482635 ± 77.5457
BM_PlanetariumPlotMethod3/NearPolarPerspectiveGSE             65.1 ms         65.3 ms           11 16317 points within -1.2998 ± 7027.21 × 3.84058 ± 7027.79 × -7.52759 ± 4127.34
BM_PlanetariumPlotMethod4/NearPolarPerspectiveGSE             36.9 ms         37.0 ms           19 8820 points within -1.60645 ± 7026.85 × 3.84521 ± 7027.74 × -5.28809 ± 4125.41
BM_PlanetariumPlotMethod3/FarPolarPerspectiveGSE              30.7 ms         30.5 ms           22 7260 points within -1.17798 ± 7026.31 × 3.85425 ± 7027.78 × -6.96802 ± 4127.02
BM_PlanetariumPlotMethod4/FarPolarPerspectiveGSE              19.4 ms         19.3 ms           34 3923 points within -1.09595 ± 7026.04 × 3.76318 ± 7027.68 × -9.66626 ± 4119.89
BM_PlanetariumPlotMethod3/NearEquatorialPerspectiveGSE        80.3 ms         81.6 ms            9 19359 points within -1.32495 ± 7027.17 × 4.62378 ± 7027.05 × -7.25586 ± 4127.08
BM_PlanetariumPlotMethod4/NearEquatorialPerspectiveGSE        45.5 ms         45.8 ms           15 10519 points within -2.08276 ± 7026.31 × 4.42847 ± 7027.22 × -7.48145 ± 4127.47
BM_PlanetariumPlotMethod3/FarEquatorialPerspectiveGSE         28.5 ms         28.6 ms           24 6011 points within -1.62256 ± 7025.46 × 14.8474 ± 7014.97 × -8.79053 ± 4125.58
BM_PlanetariumPlotMethod4/FarEquatorialPerspectiveGSE         16.1 ms         16.0 ms           41 3326 points within -6.8335 ± 7021.37 × 5.28418 ± 7023.14 × -3.22949 ± 4121.18
BM_PlanetariumPlotMethod3/NearPolarPerspectiveEML             98.5 ms         96.4 ms            6 15856 points within -0.643555 ± 7939.5 × 5.6582 ± 7241.7 × -6.72559 ± 5285.31
BM_PlanetariumPlotMethod4/NearPolarPerspectiveEML             56.0 ms         55.4 ms           11 8571 points within -0.944336 ± 7939.67 × 5.58252 ± 7242.11 × -7.2019 ± 5285.73
BM_PlanetariumPlotMethod3/FarPolarPerspectiveEML              46.5 ms         45.5 ms           11 7113 points within -0.655762 ± 7937.67 × 4.70337 ± 7241.12 × -5.95703 ± 5280.89
BM_PlanetariumPlotMethod4/FarPolarPerspectiveEML              25.8 ms         25.8 ms           26 3843 points within 2.07397 ± 7932.87 × 0.4104 ± 7236.88 × -11.6028 ± 5278.79
BM_PlanetariumPlotMethod3/NearEquatorialPerspectiveEML         110 ms          112 ms            6 17845 points within -0.211182 ± 7940.2 × 5.56128 ± 7242.08 × -6.86597 ± 5285.43
BM_PlanetariumPlotMethod4/NearEquatorialPerspectiveEML        68.2 ms         68.2 ms           11 9681 points within -0.130859 ± 7939.46 × 6.1853 ± 7241.12 × -7.25562 ± 5285.84
BM_PlanetariumPlotMethod3/FarEquatorialPerspectiveEML         45.8 ms         45.8 ms           15 6230 points within 0.322021 ± 7939.67 × 5.87646 ± 7241.74 × -6.2478 ± 5282.72
BM_PlanetariumPlotMethod4/FarEquatorialPerspectiveEML         26.7 ms         26.2 ms           25 3416 points within -11.4094 ± 7929.21 × 5.08594 ± 7240.8 × -9.42554 ± 5282.39
BM_PlanetariumPlotMethod3/NearPolarPerspectiveSEL              143 ms          141 ms            4 16376 points within -97.2134 ± 7749.1 × -715.116 ± 7746.46 × -338.572 ± 4223.46
BM_PlanetariumPlotMethod4/NearPolarPerspectiveSEL             79.3 ms         79.9 ms            9 8852 points within -95.7419 ± 7746.52 × -715.461 ± 7746.18 × -336.921 ± 4221.58
BM_PlanetariumPlotMethod3/FarPolarPerspectiveSEL              67.2 ms         68.2 ms           11 7217 points within -97.8821 ± 7748.45 × -715.6 ± 7745.42 × -339.1 ± 4221.32
BM_PlanetariumPlotMethod4/FarPolarPerspectiveSEL              38.0 ms         38.2 ms           18 3900 points within -94.417 ± 7744.98 × -715.12 ± 7743.24 × -333.762 ± 4210.86
BM_PlanetariumPlotMethod3/NearEquatorialPerspectiveSEL         168 ms          168 ms            4 19226 points within -96.8335 ± 7749.81 × -712.32 ± 7743.61 × -338.678 ± 4223.48
BM_PlanetariumPlotMethod4/NearEquatorialPerspectiveSEL        95.3 ms         96.0 ms            7 10448 points within -96.7285 ± 7749.77 × -707.959 ± 7739.25 × -338.903 ± 4223.08
BM_PlanetariumPlotMethod3/FarEquatorialPerspectiveSEL         60.4 ms         59.7 ms           11 5956 points within -97.0276 ± 7748.75 × -716.374 ± 7742.94 × -338.613 ± 4223.4
BM_PlanetariumPlotMethod4/FarEquatorialPerspectiveSEL         36.7 ms         36.7 ms           20 3291 points within -100.596 ± 7740.77 × -703.426 ± 7732.34 × -339.767 ± 4215.44

@pleroy pleroy added the verified The fix has been verified in game. label May 9, 2025
@eggrobin eggrobin added the LGTM label May 9, 2025
@pleroy pleroy merged commit 8658ad1 into mockingbirdnest:master May 9, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM verified The fix has been verified in game.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants