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

Reduce allocations when creating templates #143

Merged
merged 10 commits into from
Jul 8, 2021
Merged

Conversation

lukechu10
Copy link
Member

@lukechu10 lukechu10 commented Jul 4, 2021

No description provided.

@lukechu10 lukechu10 added the A-macro Area: macros label Jul 4, 2021
@lukechu10 lukechu10 marked this pull request as draft July 4, 2021 20:33
@lukechu10 lukechu10 added the performance Performance related label Jul 7, 2021
@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
  01_run1k               |       130.69 |   208.58 |  204.42 |   -1.99%
  02_replace1k           |       145.76 |   198.77 |  202.05 |   +1.65%
+ 03_update10th1k_x16    |       232.25 |   275.94 |  259.35 |   -6.01%
+ 04_select1k            |        41.15 |    60.97 |   52.13 |  -14.49%
+ 05_swap1k              |        69.00 |    74.19 |   69.04 |   -6.94%
- 06_remove-one-1k       |        29.19 |    27.80 |   28.56 |   +2.76%
- 07_create10k           |      1440.44 |  8109.38 | 8307.06 |   +2.44%
  08_create1k-after1k_x2 |       311.81 |   522.79 |  517.32 |   -1.05%
+ 09_clear1k_x8          |       198.85 |   251.66 |  233.10 |   -7.38%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   +0.00%
  22_run-memory          |         1.50 |     1.63 |    1.63 |   +0.00%
  23_update5-memory      |         1.82 |     1.94 |    1.94 |   -0.01%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.08%
  25_run-clear-memory    |         2.25 |     2.19 |    2.19 |   +0.01%
  31_startup-ci          |      1931.93 |  1962.06 | 1970.77 |   +0.44%
+ 32_startup-bt          |        30.80 |    46.15 |   32.97 |  -28.56%
  34_startup-totalbytes  |       197.35 |   310.53 |  310.54 |   +0.00%

Workflow: [1009732916](/sycamore-rs/sycamore/actions/runs/1009732916) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       130.40 |   211.05 |  206.30 |   -2.25%
  02_replace1k           |       143.33 |   195.85 |  197.41 |   +0.79%
  03_update10th1k_x16    |       194.49 |   238.22 |  242.00 |   +1.59%
+ 04_select1k            |        35.73 |    54.32 |   44.55 |  -18.00%
+ 05_swap1k              |        60.18 |    70.65 |   68.99 |   -2.34%
  06_remove-one-1k       |        27.04 |    28.40 |   28.06 |   -1.19%
+ 07_create10k           |      1411.16 |  8085.05 | 7294.39 |   -9.78%
  08_create1k-after1k_x2 |       312.15 |   508.21 |  510.83 |   +0.52%
- 09_clear1k_x8          |       185.54 |   229.79 |  239.29 |   +4.13%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   +0.00%
- 22_run-memory          |         1.50 |     1.63 |    1.95 |  +20.28%
+ 23_update5-memory      |         1.82 |     2.27 |    1.94 |  -14.66%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   -0.00%
  25_run-clear-memory    |         2.25 |     2.19 |    2.19 |   -0.02%
  31_startup-ci          |      1984.56 |  1995.27 | 1990.62 |   -0.23%
+ 32_startup-bt          |        45.18 |    42.98 |   40.48 |   -5.83%
  34_startup-totalbytes  |       197.35 |   310.53 |  310.30 |   -0.08%

Workflow: [1009801772](/sycamore-rs/sycamore/actions/runs/1009801772) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 7, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
- 01_run1k               |       104.25 |   169.40 |  177.90 |   +5.02%
- 02_replace1k           |       117.30 |   159.91 |  167.10 |   +4.50%
+ 03_update10th1k_x16    |       182.97 |   222.31 |  205.67 |   -7.48%
+ 04_select1k            |        34.03 |    48.05 |   46.38 |   -3.48%
+ 05_swap1k              |        56.50 |    61.41 |   59.16 |   -3.67%
  06_remove-one-1k       |        23.51 |    24.49 |   24.42 |   -0.30%
- 07_create10k           |      1091.93 |  6939.19 | 7398.04 |   +6.61%
- 08_create1k-after1k_x2 |       237.95 |   384.57 |  423.69 |  +10.17%
  09_clear1k_x8          |       163.31 |   193.58 |  194.29 |   +0.36%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   -0.13%
- 22_run-memory          |         1.50 |     1.63 |    1.96 |  +20.48%
- 23_update5-memory      |         1.82 |     1.94 |    2.27 |  +17.04%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.04%
  25_run-clear-memory    |         2.25 |     2.20 |    2.20 |   -0.02%
  31_startup-ci          |      1855.54 |  1953.59 | 1965.04 |   +0.59%
- 32_startup-bt          |        20.49 |    30.67 |   43.87 |  +43.01%
  34_startup-totalbytes  |       197.35 |   310.53 |  305.92 |   -1.48%

Workflow: [1009845844](/sycamore-rs/sycamore/actions/runs/1009845844) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
- 01_run1k               |       117.88 |   199.85 |  206.41 |   +3.29%
- 02_replace1k           |       134.21 |   175.98 |  191.61 |   +8.88%
+ 03_update10th1k_x16    |       177.45 |   219.18 |  209.45 |   -4.44%
+ 04_select1k            |        37.03 |    50.87 |   47.85 |   -5.95%
  05_swap1k              |        61.20 |    63.85 |   64.45 |   +0.94%
+ 06_remove-one-1k       |        24.71 |    26.07 |   25.52 |   -2.09%
+ 07_create10k           |      1326.74 |  7483.04 | 6746.55 |   -9.84%
+ 08_create1k-after1k_x2 |       272.89 |   454.44 |  438.52 |   -3.50%
- 09_clear1k_x8          |       207.72 |   222.93 |  247.28 |  +10.92%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   -0.00%
- 22_run-memory          |         1.50 |     1.63 |    1.95 |  +20.27%
  23_update5-memory      |         1.82 |     2.27 |    2.27 |   +0.05%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.02%
  25_run-clear-memory    |         2.25 |     2.19 |    2.20 |   +0.09%
  31_startup-ci          |      1929.91 |  1969.56 | 1958.42 |   -0.57%
- 32_startup-bt          |        20.42 |    38.12 |   47.95 |  +25.79%
  34_startup-totalbytes  |       197.35 |   310.53 |  310.81 |   +0.09%

Workflow: [1009899292](/sycamore-rs/sycamore/actions/runs/1009899292) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       132.12 |   206.72 |  191.34 |   -7.44%
+ 02_replace1k           |       148.44 |   187.33 |  181.02 |   -3.37%
+ 03_update10th1k_x16    |       217.00 |   318.78 |  231.33 |  -27.43%
+ 04_select1k            |        39.86 |    63.10 |   51.82 |  -17.89%
+ 05_swap1k              |        66.89 |    71.24 |   67.38 |   -5.43%
+ 06_remove-one-1k       |        28.40 |    29.59 |   26.39 |  -10.82%
+ 07_create10k           |      1466.40 |  8445.34 | 6957.65 |  -17.62%
+ 08_create1k-after1k_x2 |       317.31 |   525.60 |  465.83 |  -11.37%
+ 09_clear1k_x8          |       216.16 |   255.78 |  234.22 |   -8.43%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   -0.00%
- 22_run-memory          |         1.50 |     1.63 |    1.95 |  +20.27%
  23_update5-memory      |         1.82 |     1.94 |    1.94 |   +0.00%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.06%
  25_run-clear-memory    |         2.25 |     2.19 |    2.19 |   +0.01%
  31_startup-ci          |      1944.36 |  1997.42 | 1960.78 |   -1.83%
- 32_startup-bt          |        38.94 |    41.55 |   46.47 |  +11.85%
  34_startup-totalbytes  |       197.35 |   311.04 |  311.54 |   +0.16%

Workflow: [1009958424](/sycamore-rs/sycamore/actions/runs/1009958424) *Adding new commits will generate a new report*

@lukechu10 lukechu10 changed the title Clone template nodes instead of using document.createElement Reduce allocations when creating templates Jul 8, 2021
@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       127.56 |   206.01 |  196.00 |   -4.86%
- 02_replace1k           |       148.68 |   191.01 |  196.08 |   +2.65%
- 03_update10th1k_x16    |       226.23 |   235.00 |  257.86 |   +9.72%
+ 04_select1k            |        32.29 |    51.94 |   50.72 |   -2.35%
+ 05_swap1k              |        66.20 |    69.72 |   67.31 |   -3.45%
+ 06_remove-one-1k       |        27.18 |    27.82 |   26.98 |   -3.01%
+ 07_create10k           |      1391.75 |  7630.12 | 7247.28 |   -5.02%
+ 08_create1k-after1k_x2 |       301.55 |   501.28 |  463.34 |   -7.57%
- 09_clear1k_x8          |       220.47 |   244.21 |  253.40 |   +3.76%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   +0.01%
- 22_run-memory          |         1.50 |     1.63 |    1.96 |  +20.27%
  23_update5-memory      |         1.82 |     2.27 |    2.27 |   +0.00%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.00%
  25_run-clear-memory    |         2.25 |     2.20 |    2.19 |   -0.12%
+ 31_startup-ci          |      1820.08 |  2036.07 | 1988.46 |   -2.34%
- 32_startup-bt          |        31.15 |    32.23 |   38.92 |  +20.76%
  34_startup-totalbytes  |       197.35 |   311.04 |  311.56 |   +0.17%

Workflow: [1010046491](/sycamore-rs/sycamore/actions/runs/1010046491) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       115.86 |   194.16 |  181.22 |   -6.66%
+ 02_replace1k           |       131.84 |   181.48 |  176.33 |   -2.84%
+ 03_update10th1k_x16    |       213.92 |   234.19 |  194.71 |  -16.86%
- 04_select1k            |        40.77 |    44.81 |   54.36 |  +21.30%
- 05_swap1k              |        64.72 |    69.84 |   72.30 |   +3.52%
  06_remove-one-1k       |        26.25 |    27.82 |   27.86 |   +0.13%
+ 07_create10k           |      1228.73 |  7565.04 | 7351.38 |   -2.82%
+ 08_create1k-after1k_x2 |       276.10 |   458.31 |  445.96 |   -2.70%
- 09_clear1k_x8          |       184.43 |   216.05 |  224.87 |   +4.08%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   -0.01%
  22_run-memory          |         1.50 |     1.95 |    1.96 |   +0.00%
- 23_update5-memory      |         1.82 |     1.94 |    2.27 |  +17.04%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   -0.00%
- 25_run-clear-memory    |         2.25 |     2.20 |    2.28 |   +3.80%
  31_startup-ci          |      1958.52 |  1954.10 | 1959.26 |   +0.26%
  32_startup-bt          |        50.91 |    44.83 |   44.99 |   +0.36%
  34_startup-totalbytes  |       197.35 |   311.04 |  311.54 |   +0.16%

Workflow: [1010207842](/sycamore-rs/sycamore/actions/runs/1010207842) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       117.05 |   184.57 |  171.38 |   -7.14%
+ 02_replace1k           |       135.73 |   176.45 |  168.84 |   -4.31%
+ 03_update10th1k_x16    |       259.72 |   306.01 |  266.88 |  -12.79%
+ 04_select1k            |        48.23 |    64.53 |   58.43 |   -9.44%
+ 05_swap1k              |        73.21 |    74.58 |   69.67 |   -6.58%
+ 06_remove-one-1k       |        26.94 |    28.24 |   25.92 |   -8.22%
+ 07_create10k           |      1174.97 |  7800.53 | 6839.99 |  -12.31%
  08_create1k-after1k_x2 |       278.62 |   455.36 |  449.34 |   -1.32%
  09_clear1k_x8          |       185.91 |   223.95 |  219.54 |   -1.97%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   +0.01%
  22_run-memory          |         1.50 |     1.95 |    1.95 |   -0.00%
  23_update5-memory      |         1.82 |     2.27 |    2.27 |   +0.00%
  24_run5-memory         |         2.11 |     2.44 |    2.44 |   +0.00%
  25_run-clear-memory    |         2.25 |     2.20 |    2.20 |   +0.00%
  31_startup-ci          |      1922.70 |  1956.66 | 1963.61 |   +0.36%
- 32_startup-bt          |        16.09 |    29.15 |   35.43 |  +21.56%
  34_startup-totalbytes  |       197.35 |   311.04 |  310.11 |   -0.30%

Workflow: [1010242640](/sycamore-rs/sycamore/actions/runs/1010242640) *Adding new commits will generate a new report*

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
+ 01_run1k               |       108.84 |   170.68 |  158.69 |   -7.02%
+ 02_replace1k           |       126.83 |   164.33 |  159.45 |   -2.97%
+ 03_update10th1k_x16    |       237.12 |   275.89 |  261.76 |   -5.12%
- 04_select1k            |        40.41 |    52.33 |   57.53 |   +9.94%
- 05_swap1k              |        65.90 |    69.18 |   73.14 |   +5.73%
- 06_remove-one-1k       |        25.99 |    26.66 |   27.93 |   +4.74%
+ 07_create10k           |      1154.88 |  7556.02 | 4867.35 |  -35.58%
+ 08_create1k-after1k_x2 |       261.72 |   427.17 |  410.04 |   -4.01%
+ 09_clear1k_x8          |       174.19 |   218.59 |  209.66 |   -4.09%
  21_ready-memory        |         1.02 |     1.02 |    1.02 |   -0.06%
+ 22_run-memory          |         1.50 |     1.95 |    1.86 |   -4.62%
+ 23_update5-memory      |         1.82 |     2.27 |    2.18 |   -3.94%
  24_run5-memory         |         2.11 |     2.44 |    2.41 |   -1.04%
- 25_run-clear-memory    |         2.25 |     2.20 |    2.26 |   +2.91%
  31_startup-ci          |      1905.50 |  1967.80 | 1957.26 |   -0.54%
+ 32_startup-bt          |        36.06 |    33.08 |   31.62 |   -4.41%
+ 34_startup-totalbytes  |       197.35 |   311.04 |  302.38 |   -2.78%

Workflow: [1010250239](/sycamore-rs/sycamore/actions/runs/1010250239) *Adding new commits will generate a new report*

@lukechu10 lukechu10 assigned lukechu10 and unassigned lukechu10 Jul 8, 2021
@lukechu10 lukechu10 marked this pull request as ready for review July 8, 2021 03:19
@lukechu10 lukechu10 enabled auto-merge (squash) July 8, 2021 03:19
@lukechu10 lukechu10 merged commit 05852c5 into master Jul 8, 2021
@lukechu10 lukechu10 deleted the clone-template branch July 8, 2021 03:19
lukechu10 added a commit that referenced this pull request Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro Area: macros performance Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant