100% Vanilla Javascript Multithreading & Parallel Execution Library
ARTISTIC-2.0 License
Bot releases are hidden (Show)
This release resolves a few issues that will increase overall performance however it comes at a cost of higher memory usage
Resolved index calculation to support odd numbers of threads such as triple core processors
Added more unit tests
Resolved some unit tests not working in Firefox browser
Added task.output for output data, previously the library was modifying the input array as the output, this was great from a memory usage standpoint however its bad practice to modify inputs so that's no longer happening.
Cleaned up code some
Enjoy!
Published by austinksmith about 1 year ago
This release was primarily targeted around more unit testing and fixing the debugging metrics, additionally there is a slight performance increase and resolves a memory leak.
This release also drops support for Internet Explorer 9, support for Internet Explorer 10 is no longer guaranteed to work and has not been tested.
Enjoy!
Published by austinksmith about 3 years ago
This release is mainly a bug fix release and does not include any optimizations or other changes beyond fixing the below issues.
Enjoy!
Published by austinksmith about 3 years ago
I'm happy to announce the release of Hamsters.js v5.4.0, this version is a major overhaul and completes the implementation of the JIT data management system. This is truly a game changing release as it dramatically reduces memory usage while also increasing per thread scaling and reducing library overhead and total package size.
This release also comes with a few notable changes
Memoization support has been temporarily removed
JIT data management is now fully implemented, reducing memory allocation to at most 1 copy of the original input data
Removed old unused logic to reduce code package size
You can now control which threads operate on which pieces of your input data by passing a new optional indexes argument
const params = {
array: [1,2,3,4],
threads: 2,
indexes: [
{start: 0, end: 0}, //Thread one will operate on only the first element
{start: 1, end: 3} //Thread two will operate on the remaining elements
]
};
Published by austinksmith about 3 years ago
Hamsters.js v5.3.9 is officially live!
Published by austinksmith about 3 years ago
Hamsters.js v5.3.7 is officially live!
Published by austinksmith about 3 years ago
Hamsters.js v5.3.6 is officially live!
Fixed problems with React Native 0.62 and non legacy mode using react-native-hamsters
Simplified react native thread logic
Published by austinksmith about 3 years ago
Hamsters.js v5.3.5 is officially live!
Published by austinksmith about 3 years ago
Hamsters.js v5.3.3 is officially live!
Published by austinksmith over 3 years ago
Hamsters.js v5.3.2 is officially live! - THIS IS A HOTFIX PATCH RELEASE FOR V5.3.1
Published by austinksmith over 3 years ago
Hamsters.js v5.3.1 is officially live!
Published by austinksmith over 3 years ago
Hamsters.js v5.2.1 is officially live!
Published by austinksmith about 4 years ago
Hamsters.js v5.1.3 is officially live and includes some great fixes and optimizations
Published by austinksmith almost 6 years ago
Hamsters.js v5.1.2 is officially live and includes some great fixes and optimizations
Published by austinksmith over 6 years ago
With great excitement comes the announcement of version 5.1.1 of the Hamsters.js library, this release includes several fixes and general improvements.
When making use off the library within reactNative, you must now copy the src/core/common
folder to the root of your project directory.
hamsters.init({
'legacy', true/false
'reactnative' : true/false,
'browser': true/false,
'shell': true/false
'node': true/false
});
var params = {
importScripts: "foo.js"
}
hamsters.run(params.....
Lastly, some changes have been made to the build process to ensure the final library output is minified and optimized using the optimizeOrder plugin, if you have any new issues please report them as soon as possible, thanks!
Published by austinksmith over 6 years ago
With great excitement comes version 5.0.0 of Hamsters.js, this version was a complete rewrite from the ground up with an emphasis on maintainability and bringing the library up to modern development standards. Now it's easier than ever to multithread your javascript!
npm run test
actually works nowThe main goals of this release was to get the library back to it's basics, Hamsters.js has always aimed to be a high/low level abstraction for parallel and threaded workloads. To that aim we no longer provide any out of the box abstractions or tools that are not required for library functionality, you will find that in hamsters 5.0.0 calling hamsters.tools
will now be undefined.
Please consider supporting this project via our open collective, Hamsters.js has operated for the 3 years purely on out of pocket funding and the project does not want to abandon its open source aims in order to keep the lights on.
During the libraries time as an open source project we have needed to defend the project from copyright infringement and theft, my goals as the creator of this project was to give back to the JavaScript community and hopefully push the industry into making multithreading a more mainstream web application feature...after all whats the point of all these cores if we can't use them haha.
Almost immediately after publishing the library under the Artistic 2.0 license the library was cloned and all mentions of the source of the cloned project were removed giving the appearance that said user created an original from scratch project. This has happened on several occasions to varying degree over the past 3 years leaving me with a rather bad impression of the open source community as a whole, and again recently I was forced to spend over $1000 to stop a bad actor from blatantly infringing on the projects website and trade dress.
In the interest of full transparency a DMCA take down notice was issued through github to the offending repository and the host of the infringing website was contacted as well using a DMCA take down notice. This user persisted in the copyright infringement and moved web host a total of 7 different times using several methods to attempt to hide the host being used.
Ultimately after hiring a lawyer and contacting the user directly and sending a draft copy of a notice to file suit the offending party stopped the bad practices (for the time being), with these experiences it has proven to be costly both financially and mentally to continue to offer open source projects and support them. We need community support not only to continue to provide updates and support new hardware and features but also defend against these scenarios. - https://opencollective.com/hamstersjs/
Part of the reason version 5 has been delayed is due to the discovery of the Meltdown and Spectre bugs, I had been working lately to change how the library operates so it can seamlessly support atomic operations behind the scenes. This would allow the library to dramatically reduce run time overhead and allow multiple threads to access a single shared array unfortunately right around the time I had hoped to release the new version it was announced these vulnerabilities existed in Intel X86 processors.
As a mitigation attempt all major browsers have since removed support for the most critical aspect of this functionality and that is the SharedArrayBuffer, this has had a major detrimental impact on the projects goals as I have waited a very long time for SharedArrayBuffer's to become mainstream only to have them removed due to security problems introduced by Intel.
Should SharedArrayBuffer support be brought back to browsers (unlikely at this point), then I will release a new version including them which will result in a major performance bump for the library.
This release marks 3 years Hamsters.js has been in development, this project started out as me simply wanting to learn more about parallelism and multithreading since I had rarely made use of it in my software development career. I want to thank everyone who has supported the project and has given their recommendations on how to improve the library, the lessons I learned through the development of this project have been monumental and they won't soon be forgotten.
Be sure to checkout the updated https://www.hamsters.io/wiki for more information on how to get started with v5.0.0
ENJOY
Published by austinksmith about 7 years ago
This release aims to resolve issues in extremely heavy workloads that can in rare situations cause out of memory errors in certain browsers before the garbage collector has been invoked.
The screen shot below is an allocation timeline using v4.2.0 note the retained size of the typed Int32Array where roughly 81% of the original array backing store was retained.
Since v4.2.1 now explicitly marks the params and rtn objects within a thread as undefined and ready for garbage collection we can see the results using the same test do not retain any of this data after execution.
Please report any performance degradation you encounter in comparison to v4.2.0 as this may cause the garbage collector to run more frequently than before though it should eliminate these out of memory errors moving forward.
Published by austinksmith about 7 years ago
This release is targeted at decoupling the library logic into more easily logically separated pieces, future releases will expand on this more down the road with plans to offer more out of the box abstractions for tasks that can benefit from parallelism.
This release also includes many other general code improvements that should result in better performance and reduce the overall complexity of the library.
As this change also includes changes to the internal naming conventions of the library this release skips ahead from 4.1.4 all the way to 4.2.0 as it is a somewhat significant change, all logic written for previous releases should still be backwards compatible, please submit a bug ticket if you encounter any new issues.
Published by austinksmith over 7 years ago
This release is another bug fix release that aims to resolve issues related to ReactNative support.
Resolved Issues
React Native Worker is undefined https://github.com/austinksmith/Hamsters.js/issues/35
Beta Features
This release also extends beta support for third party worker implementations on ReactNative, submit a ticket if you encounter an issue with a specific worker implementation.
Published by austinksmith over 7 years ago
v4.1.3
This release is another bug fix release that aims to resolve outstanding issues related to Node.js third party WebWorker implementations.
Resolved Issues
Worker is undefined under Node.js https://github.com/austinksmith/Hamsters.js/issues/27