Skip to content

Refactor the 'Spline' node to use Kurbo instead of Bezier-rs #2701

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 9 commits into from
Jun 9, 2025

Conversation

indierusty
Copy link
Collaborator

@indierusty indierusty commented Jun 8, 2025

Part of #2635

Copy link

github-actions bot commented Jun 8, 2025

Performance Benchmark Results

compile_demo_art_iai::compile_group::compile_to_proto with_setup_0:load_from_name(isometric-fountain)
Instructions: 25,052,259 (master) -> 25,026,851 (HEAD) : $$\color{lime}-0.10\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     310,365|    310,268          -0.03%
D1mw                      98,233|     99,078          +0.86%
DLmr                      28,744|     28,584          -0.56%
DLmw                      39,353|     33,721         -14.31%
Dr                     6,026,725|  6,019,502          -0.12%
Dw                     4,266,572|  4,263,193          -0.08%
EstimatedCycles       39,207,712| 39,011,498          -0.50%
I1mr                      39,726|     42,322          +6.53%
ILmr                         865|        871          +0.69%
Ir                    25,052,259| 25,026,851          -0.10%
L1hits                34,897,232| 34,857,878          -0.11%
LLhits                   379,362|    388,492          +2.41%
RamHits                   68,962|     63,176          -8.39%
TotalRW               35,345,556| 35,309,546          -0.10%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_1:load_from_name(painted-dreams)
Instructions: 13,040,518 (master) -> 12,239,447 (HEAD) : $$\color{lime}-6.14\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     156,242|    145,050          -7.16%
D1mw                      49,909|     46,771          -6.29%
DLmr                         740|        329         -55.54%
DLmw                      16,222|     14,701          -9.38%
Dr                     3,137,711|  2,943,354          -6.19%
Dw                     2,212,573|  2,075,706          -6.19%
EstimatedCycles       19,823,842| 18,579,405          -6.28%
I1mr                      19,389|     20,166          +4.01%
ILmr                         734|        735          +0.14%
Ir                    13,040,518| 12,239,447          -6.14%
L1hits                18,165,262| 17,046,520          -6.16%
LLhits                   207,844|    196,222          -5.59%
RamHits                   17,696|     15,765         -10.91%
TotalRW               18,390,802| 17,258,507          -6.16%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_2:load_from_name(procedural-string-lights)
Instructions: 2,156,872 (master) -> 2,648,228 (HEAD) : $$\color{red}+22.78\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                      22,194|     27,395         +23.43%
D1mw                      10,519|     12,331         +17.23%
DLmr                          18|         21         +16.67%
DLmw                       2,478|      2,560          +3.31%
Dr                       494,213|    608,909         +23.21%
Dw                       361,222|    445,319         +23.28%
EstimatedCycles        3,257,057|  3,983,522         +22.30%
I1mr                       4,407|      5,753         +30.54%
ILmr                         713|        724          +1.54%
Ir                     2,156,872|  2,648,228         +22.78%
L1hits                 2,975,187|  3,656,977         +22.92%
LLhits                    33,911|     42,174         +24.37%
RamHits                    3,209|      3,305          +2.99%
TotalRW                3,012,307|  3,702,456         +22.91%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_3:load_from_name(parametric-dunescape)
Instructions: 12,502,564 (master) -> 12,497,415 (HEAD) : $$\color{lime}-0.04\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     153,019|    152,653          -0.24%
D1mw                      50,662|     50,447          -0.42%
DLmr                          46|         41         -10.87%
DLmw                      12,199|     12,110          -0.73%
Dr                     2,974,172|  2,972,924          -0.04%
Dw                     2,124,195|  2,123,435          -0.04%
EstimatedCycles       18,880,297| 18,870,704          -0.05%
I1mr                      17,978|     18,610          +3.52%
ILmr                         846|        852          +0.71%
Ir                    12,502,564| 12,497,415          -0.04%
L1hits                17,379,272| 17,372,064          -0.04%
LLhits                   208,568|    208,707          +0.07%
RamHits                   13,091|     13,003          -0.67%
TotalRW               17,600,931| 17,593,774          -0.04%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_4:load_from_name(red-dress)
Instructions: 29,992,760 (master) -> 29,978,368 (HEAD) : $$\color{lime}-0.05\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     382,245|    382,278          +0.01%
D1mw                     127,273|    126,432          -0.66%
DLmr                      40,651|     40,632          -0.05%
DLmw                      62,092|     63,937          +2.97%
Dr                     7,154,869|  7,152,149          -0.04%
Dw                     5,073,477|  5,073,176          -0.01%
EstimatedCycles       47,538,912| 47,586,117          +0.10%
I1mr                      42,806|     46,021          +7.51%
ILmr                         874|        881          +0.80%
Ir                    29,992,760| 29,978,368          -0.05%
L1hits                41,668,782| 41,648,962          -0.05%
LLhits                   448,707|    449,281          +0.13%
RamHits                  103,617|    105,450          +1.77%
TotalRW               42,221,106| 42,203,693          -0.04%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_5:load_from_name(valley-of-spires)
Instructions: 19,020,697 (master) -> 19,001,426 (HEAD) : $$\color{lime}-0.10\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     235,742|    234,503          -0.53%
D1mw                      77,187|     76,010          -1.52%
DLmr                      12,290|     12,017          -2.22%
DLmw                      29,147|     29,473          +1.12%
Dr                     4,559,288|  4,555,590          -0.08%
Dw                     3,228,867|  3,226,956          -0.06%
EstimatedCycles       29,445,718| 29,420,764          -0.08%
I1mr                      29,690|     31,750          +6.94%
ILmr                         776|        768          -1.03%
Ir                    19,020,697| 19,001,426          -0.10%
L1hits                26,466,233| 26,441,709          -0.09%
LLhits                   300,406|    300,005          -0.13%
RamHits                   42,213|     42,258          +0.11%
TotalRW               26,808,852| 26,783,972          -0.09%

@indierusty indierusty marked this pull request as draft June 8, 2025 09:56
Copy link

github-actions bot commented Jun 8, 2025

Performance Benchmark Results

compile_demo_art_iai::compile_group::compile_to_proto with_setup_0:load_from_name(isometric-fountain)
Instructions: 25,050,360 (master) -> 25,029,656 (HEAD) : $$\color{lime}-0.08\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     310,403|    309,375          -0.33%
D1mw                      98,311|     98,419          +0.11%
DLmr                      28,748|     28,585          -0.57%
DLmw                      39,368|     33,003         -16.17%
Dr                     6,026,524|  6,020,881          -0.09%
Dw                     4,266,566|  4,263,810          -0.06%
EstimatedCycles       39,206,678| 38,983,661          -0.57%
I1mr                      39,728|     41,032          +3.28%
ILmr                         866|        879          +1.50%
Ir                    25,050,360| 25,029,656          -0.08%
L1hits                34,895,008| 34,865,521          -0.08%
LLhits                   379,460|    386,359          +1.82%
RamHits                   68,982|     62,467          -9.44%
TotalRW               35,343,450| 35,314,347          -0.08%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_1:load_from_name(painted-dreams)
Instructions: 13,041,519 (master) -> 12,256,137 (HEAD) : $$\color{lime}-6.02\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     156,148|    145,087          -7.08%
D1mw                      49,893|     46,930          -5.94%
DLmr                         740|        285         -61.49%
DLmw                      16,221|     14,916          -8.05%
Dr                     3,137,738|  2,946,221          -6.10%
Dw                     2,212,455|  2,077,350          -6.11%
EstimatedCycles       19,824,282| 18,603,830          -6.16%
I1mr                      19,389|     19,516          +0.66%
ILmr                         734|        732          -0.27%
Ir                    13,041,519| 12,256,137          -6.02%
L1hits                18,166,282| 17,068,175          -6.04%
LLhits                   207,735|    195,600          -5.84%
RamHits                   17,695|     15,933          -9.96%
TotalRW               18,391,712| 17,279,708          -6.05%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_2:load_from_name(procedural-string-lights)
Instructions: 2,157,467 (master) -> 2,650,005 (HEAD) : $$\color{red}+22.83\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                      22,200|     27,281         +22.89%
D1mw                      10,501|     12,410         +18.18%
DLmr                          18|         18          +0.00%
DLmw                       2,475|      2,601          +5.09%
Dr                       494,258|    609,197         +23.25%
Dw                       361,206|    445,423         +23.32%
EstimatedCycles        3,257,543|  3,986,373         +22.37%
I1mr                       4,407|      5,666         +28.57%
ILmr                         713|        725          +1.68%
Ir                     2,157,467|  2,650,005         +22.83%
L1hits                 2,975,823|  3,659,268         +22.97%
LLhits                    33,902|     42,013         +23.92%
RamHits                    3,206|      3,344          +4.30%
TotalRW                3,012,931|  3,704,625         +22.96%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_3:load_from_name(parametric-dunescape)
Instructions: 12,503,796 (master) -> 12,496,394 (HEAD) : $$\color{lime}-0.06\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     153,013|    152,378          -0.41%
D1mw                      50,700|     50,352          -0.69%
DLmr                          46|         46          +0.00%
DLmw                      12,198|     12,166          -0.26%
Dr                     2,974,341|  2,972,838          -0.05%
Dw                     2,124,266|  2,123,202          -0.05%
EstimatedCycles       18,881,867| 18,866,538          -0.08%
I1mr                      17,978|     17,906          -0.40%
ILmr                         846|        840          -0.71%
Ir                    12,503,796| 12,496,394          -0.06%
L1hits                17,380,712| 17,371,798          -0.05%
LLhits                   208,601|    207,584          -0.49%
RamHits                   13,090|     13,052          -0.29%
TotalRW               17,602,403| 17,592,434          -0.06%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_4:load_from_name(red-dress)
Instructions: 29,987,765 (master) -> 29,983,369 (HEAD) : $$\color{lime}-0.01\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     382,196|    382,547          +0.09%
D1mw                     127,371|    126,891          -0.38%
DLmr                      40,649|     40,727          +0.19%
DLmw                      62,058|     63,847          +2.88%
Dr                     7,154,320|  7,153,085          -0.02%
Dw                     5,073,532|  5,073,245          -0.01%
EstimatedCycles       47,532,539| 47,589,467          +0.12%
I1mr                      42,806|     44,584          +4.15%
ILmr                         874|        882          +0.92%
Ir                    29,987,765| 29,983,369          -0.01%
L1hits                41,663,244| 41,655,677          -0.02%
LLhits                   448,792|    448,566          -0.05%
RamHits                  103,581|    105,456          +1.81%
TotalRW               42,215,617| 42,209,699          -0.01%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_5:load_from_name(valley-of-spires)
Instructions: 19,018,118 (master) -> 19,006,700 (HEAD) : $$\color{lime}-0.06\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     235,828|    235,237          -0.25%
D1mw                      77,244|     76,986          -0.33%
DLmr                      12,304|     12,179          -1.02%
DLmw                      29,140|     29,157          +0.06%
Dr                     4,558,942|  4,557,825          -0.02%
Dw                     3,228,841|  3,227,578          -0.04%
EstimatedCycles       29,443,545| 29,427,497          -0.05%
I1mr                      29,689|     30,868          +3.97%
ILmr                         776|        765          -1.42%
Ir                    19,018,118| 19,006,700          -0.06%
L1hits                26,463,140| 26,449,012          -0.05%
LLhits                   300,541|    300,990          +0.15%
RamHits                   42,220|     42,101          -0.28%
TotalRW               26,805,901| 26,792,103          -0.05%

@Keavon Keavon changed the title Refactor 'Spline' node to use Kurbo instead of Bezier-rs Refactor the 'Spline' node to use Kurbo instead of Bezier-rs Jun 9, 2025
@Keavon Keavon enabled auto-merge (squash) June 9, 2025 07:14
@Keavon Keavon merged commit 5c8cd9a into master Jun 9, 2025
4 checks passed
@Keavon Keavon deleted the ir/spline branch June 9, 2025 07:23
Keavon added a commit that referenced this pull request Jun 20, 2025
* copy and refactor spline algorithm from Bezier-rs

* add comments

* refactor spline node

* fix spline when path is closed

* use refactored version of spline algorithm

* revert changes to 'Spline' node funtion

* use manipulator groups instead of bezpath

* Fix comment

---------

Co-authored-by: Keavon Chambers <[email protected]>
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.

2 participants