Square Root Example

This example is designed to give an idea on how performance can scale using Hamsters, you can play around with different test sizes to see how scaling changes with problem size. This is what would be considered an embarassingly parallel problem, we are looping through the test data set multiple times, calculating the square root of every integer, and returning the results from each thread. Each time we are increasing the number of threads we are using by one until reaching the number of logical threads detected. When the benchmark is complete, it should render a graph showing how much faster (or slower) the logic ran with each additional thread.

Client Summary

  • Hamsters.js Version:
  • Maximum Threads:
  • Browser:
  • Legacy Mode:
  • Atomic Operations Support:
  • Transferable Object Support:

Test Size

Random Integers

Benchmark Results

Execution Time - Lower is better

Thread Scaling % Improvement - Higher is better