|
1 | | -<!DOCTYPE html> |
| 1 | +<!doctype html> |
2 | 2 | <html> |
3 | | -<head> |
4 | | - <meta charset="utf-8"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
5 | 5 | <title>wasm-par-mq - MSM Benchmark</title> |
6 | 6 | <style> |
7 | | - body { |
8 | | - font-family: system-ui, sans-serif; |
9 | | - max-width: 800px; |
10 | | - margin: 50px auto; |
11 | | - padding: 20px; |
12 | | - } |
13 | | - h1 { color: #333; } |
14 | | - .test-section { |
15 | | - background: #f5f5f5; |
16 | | - padding: 20px; |
17 | | - margin: 20px 0; |
18 | | - border-radius: 8px; |
19 | | - } |
20 | | - button { |
21 | | - background: #007bff; |
22 | | - color: white; |
23 | | - border: none; |
24 | | - padding: 10px 20px; |
25 | | - border-radius: 4px; |
26 | | - cursor: pointer; |
27 | | - margin: 5px; |
28 | | - } |
29 | | - button:hover { background: #0056b3; } |
30 | | - button:disabled { background: #ccc; } |
31 | | - label { |
32 | | - margin-right: 20px; |
33 | | - } |
34 | | - select { |
35 | | - padding: 5px 10px; |
36 | | - border-radius: 4px; |
37 | | - border: 1px solid #ccc; |
38 | | - } |
39 | | - .result { |
40 | | - background: #e8f5e9; |
41 | | - padding: 10px; |
42 | | - margin-top: 10px; |
43 | | - border-radius: 4px; |
44 | | - font-family: monospace; |
45 | | - white-space: pre-wrap; |
46 | | - } |
47 | | - .error { |
48 | | - background: #ffebee; |
49 | | - color: #c62828; |
50 | | - } |
51 | | - #status { |
52 | | - padding: 10px; |
53 | | - margin: 10px 0; |
54 | | - border-radius: 4px; |
55 | | - } |
56 | | - .status-loading { background: #fff3e0; } |
57 | | - .status-ready { background: #e8f5e9; } |
58 | | - .status-error { background: #ffebee; } |
| 7 | + body { |
| 8 | + font-family: system-ui, sans-serif; |
| 9 | + max-width: 800px; |
| 10 | + margin: 50px auto; |
| 11 | + padding: 20px; |
| 12 | + } |
| 13 | + h1 { |
| 14 | + color: #333; |
| 15 | + } |
| 16 | + .test-section { |
| 17 | + background: #f5f5f5; |
| 18 | + padding: 20px; |
| 19 | + margin: 20px 0; |
| 20 | + border-radius: 8px; |
| 21 | + } |
| 22 | + button { |
| 23 | + background: #007bff; |
| 24 | + color: white; |
| 25 | + border: none; |
| 26 | + padding: 10px 20px; |
| 27 | + border-radius: 4px; |
| 28 | + cursor: pointer; |
| 29 | + margin: 5px; |
| 30 | + } |
| 31 | + button:hover { |
| 32 | + background: #0056b3; |
| 33 | + } |
| 34 | + button:disabled { |
| 35 | + background: #ccc; |
| 36 | + } |
| 37 | + label { |
| 38 | + margin-right: 20px; |
| 39 | + } |
| 40 | + select { |
| 41 | + padding: 5px 10px; |
| 42 | + border-radius: 4px; |
| 43 | + border: 1px solid #ccc; |
| 44 | + } |
| 45 | + .result { |
| 46 | + background: #e8f5e9; |
| 47 | + padding: 10px; |
| 48 | + margin-top: 10px; |
| 49 | + border-radius: 4px; |
| 50 | + font-family: monospace; |
| 51 | + white-space: pre-wrap; |
| 52 | + } |
| 53 | + .error { |
| 54 | + background: #ffebee; |
| 55 | + color: #c62828; |
| 56 | + } |
| 57 | + #status { |
| 58 | + padding: 10px; |
| 59 | + margin: 10px 0; |
| 60 | + border-radius: 4px; |
| 61 | + } |
| 62 | + .status-loading { |
| 63 | + background: #fff3e0; |
| 64 | + } |
| 65 | + .status-ready { |
| 66 | + background: #e8f5e9; |
| 67 | + } |
| 68 | + .status-error { |
| 69 | + background: #ffebee; |
| 70 | + } |
59 | 71 | </style> |
60 | | -</head> |
61 | | -<body> |
| 72 | + </head> |
| 73 | + <body> |
62 | 74 | <h1>wasm-par-mq - MSM Benchmark</h1> |
63 | 75 |
|
64 | 76 | <div id="status" class="status-loading">Loading WASM...</div> |
65 | 77 |
|
66 | 78 | <div class="test-section"> |
67 | | - <h2>Configuration</h2> |
68 | | - <label> |
69 | | - Number of workers: |
70 | | - <select id="worker-count"> |
71 | | - <option value="1">1 worker</option> |
72 | | - <option value="2">2 workers</option> |
73 | | - <option value="4" selected>4 workers</option> |
74 | | - <option value="8">8 workers</option> |
75 | | - <option value="16">16 workers</option> |
76 | | - </select> |
77 | | - </label> |
78 | | - <label> |
79 | | - Mode: |
80 | | - <select id="pool-mode"> |
81 | | - <option value="async" selected>Async</option> |
82 | | - <option value="sync">Sync Executor</option> |
83 | | - </select> |
84 | | - </label> |
85 | | - <span id="pool-status"></span> |
| 79 | + <h2>Configuration</h2> |
| 80 | + <label> |
| 81 | + Number of workers: |
| 82 | + <select id="worker-count"> |
| 83 | + <option value="1">1 worker</option> |
| 84 | + <option value="2">2 workers</option> |
| 85 | + <option value="4" selected>4 workers</option> |
| 86 | + <option value="8">8 workers</option> |
| 87 | + <option value="16">16 workers</option> |
| 88 | + </select> |
| 89 | + </label> |
| 90 | + <label> |
| 91 | + Mode: |
| 92 | + <select id="pool-mode"> |
| 93 | + <option value="async" selected>Async</option> |
| 94 | + <option value="sync">Sync Executor</option> |
| 95 | + </select> |
| 96 | + </label> |
| 97 | + <span id="pool-status"></span> |
86 | 98 | </div> |
87 | 99 |
|
88 | 100 | <div class="test-section"> |
89 | | - <h2>Multi-Scalar Multiplication (MSM)</h2> |
90 | | - <p>Compute MSM on a set of points and scalars</p> |
91 | | - <label> |
92 | | - Number of elements: |
93 | | - <select id="msm-len"> |
94 | | - <option value="1000">1,000</option> |
95 | | - <option value="5000">5,000</option> |
96 | | - <option value="10000" selected>10,000</option> |
97 | | - <option value="50000">50,000</option> |
98 | | - <option value="100000">100,000</option> |
99 | | - </select> |
100 | | - </label> |
101 | | - <br><br> |
102 | | - <button id="btn-msm-parallel" disabled>Run Parallel (workers)</button> |
103 | | - <button id="btn-msm-sync" disabled>Run Sync Executor</button> |
104 | | - <button id="btn-msm-sequential" disabled>Run Sequential (main thread)</button> |
105 | | - <button id="btn-msm-compare" disabled>Compare Results</button> |
106 | | - <div id="result-msm" class="result" hidden></div> |
| 101 | + <h2>Multi-Scalar Multiplication (MSM)</h2> |
| 102 | + <p>Compute MSM on a set of points and scalars</p> |
| 103 | + <label> |
| 104 | + Number of elements: |
| 105 | + <select id="msm-len"> |
| 106 | + <option value="1000">1,000</option> |
| 107 | + <option value="5000">5,000</option> |
| 108 | + <option value="10000" selected>10,000</option> |
| 109 | + <option value="50000">50,000</option> |
| 110 | + <option value="100000">100,000</option> |
| 111 | + </select> |
| 112 | + </label> |
| 113 | + <br /><br /> |
| 114 | + <button id="btn-msm-parallel" disabled>Run Parallel (workers)</button> |
| 115 | + <button id="btn-msm-sync" disabled>Run Sync Executor</button> |
| 116 | + <button id="btn-msm-sequential" disabled> |
| 117 | + Run Sequential (main thread) |
| 118 | + </button> |
| 119 | + <button id="btn-msm-compare" disabled>Compare Results</button> |
| 120 | + <div id="result-msm" class="result" hidden></div> |
107 | 121 | </div> |
108 | 122 |
|
109 | | -</body> |
110 | 123 | <script src="./index.js"></script> |
| 124 | + </body> |
111 | 125 | </html> |
0 commit comments