Build your inputs
Generate with a seed, or edit the integer values below.
Multiply matrices, explore thread granularity, and see what the JVM actually does.
Generate with a seed, or edit the integer values below.
Run an algorithm to see the output matrix, elapsed time, and actual worker count.
Single-run wall time includes thread creation and joining. Use Benchmark lab for warmed, repeated comparisons. Matrix previews show at most 32 × 32 cells.
Identical inputs. Rotated execution order. Warmed, repeated, and verified.
All three methods run on the same matrices. Setup and rendering stay outside the timer.
Mean milliseconds · latest shape
Square dimension N vs mean ms
Sequential mean / method mean
Standard deviation describes sample variability, not a confidence interval.
| Shape (A · B) | Method | Mean (ms) | Median (ms) | SD (ms) | Speedup | Workers | Verified |
|---|---|---|---|---|---|---|---|
| Run a suite to collect real measurements. | |||||||
The same mathematics. Three ways to divide the work.
A single computational thread walks the output rows and columns. Every cell is a dot product of one row of A and one column of B.
C[i,j] = Σ A[i,k] × B[k,j]Zero additional workers. Often best for small matrices because there is no thread launch overhead.
The engine starts m real Java platform threads. Each owns one whole result row, then the coordinator joins every worker.
m launches · n × p work per workerLarger tasks can amortize launch cost. More threads than available processors can add scheduling pressure.
The engine starts a new platform thread for each result cell. Every worker owns one output value. This is not a pool or a simulation.
m × p launches · n work per workerTiny tasks create substantial overhead. Outputs above 1,024 cells are rejected before launching workers.
All methods use the same checked 64-bit integer kernel. Overflow rejects a calculation. Output is compared element by element against an untimed reference.
Inputs are read-only. Workers write disjoint result elements. Joining establishes visibility; false sharing can still affect cache performance.
Warm-ups are discarded. The mean, median, sample SD, raw samples, and matching sequential speedup are measured on this server. No timing values are preloaded.
Browser inputs are limited to 128 per dimension. One experiment runs at a time with a 30-second deadline. Cancelling waits for worker cleanup; failed jobs publish no partial result.