Skip to content

Releases: austinksmith/Hamsters.js

Hamsters v5.6.0 Released!

25 Aug 14:12
Compare
Choose a tag to compare

I'm happy to announce the release of Hamsters.js version 5.6.0, this release brings a few changes to the overall project structure and upgrades many of the development dependencies the library relies on such as babel and webpack, these have been upgraded to the latest version and the library is now being minified properly when built resulting in a significantly smaller binary file size , now down to less than 30KB.

Release Notes

  • Updated dev dependencies, patching all known security vulnerabilities.
  • Restructured scaffold files for maintainability and proper support for new babel version
  • Switched test cases from using PhantomJS (now deprecated), and Firefox, to using ChromeHeadless

Warnings

  • Explicit support for ES5 is no longer provided, moving forward Hamsters.js will make use of ES6+ features for performance reasons, babel is now configured to target ES6 environments.

Hamsters.js v5.5.9 Released!

10 Aug 12:15
Compare
Choose a tag to compare

This release brings a bug fix, and lays the ground work for new distributed computing features. These features do require the use of a node.js server application that will require some sort of license to use in the future. The details are still being ironed out however you can still use the new version of Hamsters.js with the client side support for these features already baked in (subject to change in future versions). If you do not have the node.js server application setup and running and you do not pass the server relay url as a start option to the library then the distributed and networking related features are disabled and unusable.

This release also should improve performance slightly especially for Node.js.

Bug Fixes

  • Resolved potential race condition when making use of multiple threads being called using
hamsters.promise 

Improvements

  • Node.js is now making use of the new transferable logic introduced in v5.5.8
  • The transferable logic for both Node.js and Web have been updated to improve performance

Features

  • Distributed Computing! - This new feature will allow the distribution of tasks between clients, currently this is limited to using 1 thread at a time so a client can execute a function and have the work be completed on a different clients machine and the results be processed seamlessly as though the work was done on the original clients machine. Future releases will expand on this, alongside the release of the required server side application for this feature to work, the eventual goal is super computing, with a single client having access to the full computing power of every client connected to the same application.

hamstersjs_wallpaper

Hamsters.js v5.5.8 Released!

18 Jun 17:16
Compare
Choose a tag to compare

I'm happy to announce the release of version 5.5.8 of Hamsters.js, this release changes how transferable objects are handled and will now make use of transferable objects in all scenarios where a transferable data type is being sent. Previously only typed arrays were being sent using transferable objects now it can be any of the following.

   const typedArrayTypes = [
      'Int32Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 
      'Uint16Array', 'Uint32Array', 'Float32Array', 'Float64Array'
    ];
    const otherTransferables = [
      'ArrayBuffer', 'MessagePort', 'ImageBitmap', 'OffscreenCanvas'
    ];

Future releases will expand on this to allow you to handle these as responses better.

Enjoy!

Hamsters v5.5.7 Released!

15 Jun 14:15
Compare
Choose a tag to compare

This release is a hotfix release and patches support for using SharedArray buffers and not also passing array in your params object.

Hamsters v5.5.6 Released!

15 Jun 13:33
Compare
Choose a tag to compare

We're happy to release version 5.5.6 of Hamsters.js, this release fixes a bug when mixedOutput: true is passed in the params object and also cleans up the library architecture a little by moving hamsters.js tasks into their own class for creation. As well as some improvements to the memoization store, now its a LRU cache with a maximum of 100 entries in the database preventing memory usage from growing infinitely.

See the list below.

Bug Fixes

  1. Fixed issues where final outputs would be erroneous when mixedOutput: true passed in params

Improvements

  1. Moved hamstersjs task creation from being a simple in memory object to being a full fledged class
  2. Memoization store is now a Least Recently Used Cache, with a max of 100 database entries

Hamsters.js Memoization

Hamsters v5.5.5 Released!

14 Jun 23:44
Compare
Choose a tag to compare

We're happy to release version 5.5.5 of Hamsters.js, this release builds fixes several issues and brings back a new feature that was part of Hamsters.js early days.

See the list below.

Bug Fixes

  1. Pool is undefined error when tasks get queued for processing
  2. In situations where the thread pool is maxed out, a new thread will not spawn
  3. Library not starting in Node.js in some instances

Features

  1. Memoization, cache the results of your Hamsters.js functions. You can read more about how to use the new memoize feature here

Hamsters.js now supports memoization

Hamsters v5.5.4 Released!

13 Jun 13:32
Compare
Choose a tag to compare

We're happy to release version 5.5.3 of Hamsters.js, this release builds upon the newly introduced support for Atomic Operations in version 5.5.3 , this is an additional performance optimization that eliminates the overhead of passing the sharedArray to each thread.

In testing this resulted in a performance improvement of between 3.15% to 8.63% , depending on the number of threads being used.

Tested running the Atomic Operations Example with a million integers, comparing v5.5.3 to v5.5.4 using an Ubuntu 22.04 LTS 64-bit test machine with a Core i5-8300H 2.3ghz 4 cores 8 threads, 16GB DDR4 2400mhz dual channel.

Additionally the README and Hamsters.js Wiki have been updated with new information on making use of Atomics!

Hamsters.js supports  even faster Atomic Operations

Hamsters v5.5.3 Released!

12 Jun 04:08
Compare
Choose a tag to compare

We're happy to release version 5.5.3 of Hamsters.js, this release brings the very long coming support for Atomic Operations, allowing us to completely eliminate the majority of thread communication overhead improving performance significantly.

Hamsters.js supports Atomic Operations

We are in the process of updating the wiki documentation for this new feature, When running the new benchmark and comparing the results to our Collatz Conjecture example without SharedArrays, and our Atomic Operations Example which uses SharedArrays && Atomic Operations, we can see performance increases in the table below. The following results were taken on a Core i5 8300H 2.3ghz 4c/8t processor, 16GB of DDR4 2400mhz dual channel, running on Ubuntu 22.04 LTS

FireFox 126.0.1 (64-bit) -

Number of Threads Time Taken (Result Set 1 - No SharedArrays) Time Taken (Result Set 2 - SharedArrays) Time Difference (ms) % Performance Increase
1 9,908ms 9,421.54ms 486.46ms 4.91%
2 5,962ms 5,302.82ms 659.18ms 11.06%
3 4,637ms 3,830.7ms 806.3ms 17.39%
4 4,302ms 4,118.26ms 183.74ms 4.27%
5 3,489ms 3,828.34ms -339.34ms -9.73%
6 3,514ms 3,576.22ms -62.22ms -1.77%
7 3,367ms 3,104.14ms 262.86ms 7.81%
8 3,302ms 3,098.24ms 203.76ms 6.17%
Average 5,060.13ms 4,660.16ms 399.97ms 8.24%

Brave v1.66.118 -

Number of Threads Time Taken (Result Set 1 - No SharedArrays) Time Taken (Result Set 2 - SharedArrays) Time Difference (ms) % Performance Increase
1 66,725ms 58,918ms 7,807ms 11.70%
2 37,278ms 32,366ms 4,912ms 13.18%
3 27,766ms 23,642ms 4,124ms 14.85%
4 23,445ms 19,418ms 4,027ms 17.18%
5 22,886ms 21,160ms 1,726ms 7.54%
6 22,344ms 19,723ms 2,621ms 11.73%
7 24,496ms 18,582ms 5,914ms 24.14%
8 22,486ms 18,965ms 3,521ms 15.66%
Average 30,928.75ms 26,471.63ms 4,457.13ms 14.50%

Enjoy!

Hamsters v5.5.2 Released!

09 Jun 14:12
Compare
Choose a tag to compare

We're happy to release version 5.5.2 of Hamsters.js, this release is aimed at performance and provides some gains for tasks that use only a single thread with a percentage improvement is approximately 21.4% in benchmarks.

  1. Removed unnecessary if statement and return during runtime - improves performance in all scenarios
  2. Removed expensive indexe's calculation from function calls that use only 1 function, improves performance for single threaded tasks
  3. Refined task object creation for better performance and removing unnecessary checks

Enjoy!

Hamsters v5.5.1 Released!

06 Jun 14:48
Compare
Choose a tag to compare

We're happy to release version 5.5.1 of Hamsters.js, this is more of a hotpatch than a release, it just builds upon v5.5.0

  • This is a simple bug fix that restores the typedArrayFromBuffer method that was previously removed in version v5.4.3

Enjoy!