ExperimentalHashMapLib is an experimental HashMap implementation for Sysmac. This was created to confirm issues when implementing associative arrays. It is a functional implementation of HashMap, as it cannot be extended linguistically. This implementation has performance issues that limit its use. It also lacks memory management, so deleting a value will not reuse that space. For details, please check this article (Japanese). The performance is as follows:
Operation | Minimum(us) | Maximum(us) | Average(us) |
---|---|---|---|
Get | 30 | 41 | 34 |
Put | 66 | 86 | 72 |
Update | 82 | 106 | 91 |
Delete | 84 | 105 | 91 |
Performance with NX102-9000 Ver 1.64 (n=64, key=33 bytes)
This project was built and performance verified in the following environment:
Controller | NX102-9000 Ver 1.64 |
Sysmac Studio | Ver.1.61 |
git clone
this repository or download the zip.- Open "ExperimentalHashMapLib.smc2" in Sysmac Studio.
- Reference "lib/MurmurHash3Lib.slr" as a library.
- Reference "lib/STUnitLib.slr" as a library.
- Check "POU/Program/README".
- Match the controller settings to your running environment.
- Build the project.
- Run on the simulator or on the actual machine.
I recommend checking the hash value of the acquired Sysmac Studio project.
file | sha256 |
---|---|
ExperimentalHashMapLib.scm2 | 20456bd6496db0abb4b4b6f4935d1aad62b520cff6d08bb3fc5e601c0207da00 |