Types. They are the heart of the any language, similarly they are the core of what CIlib operates on.
We are always looking to make things simpler and less error prone, as a result we have decided to look at the core of the library. A refactoring to solidify the core design, with the intention of refactoring as we go to correct the remainder of the library, has started and so far we are pleased with the results.
The reasoning for the refactor include:
- Simpler usage of types.
- Easy to understand API.
- Type instances that have clearly defined responsibilities.
- Immutability wherever possible to prevent snowball effects of errors.
Additionally, Vector instances are now created using a builder with all the current constructors on Vector being deprecated for the moment. Obviously, the intention is to remove all deprecations as soon as possible.
There will be changes to the manner in which our users use the Vector, however, we believe that the changes are very valid and warrant the minor API change.
When using the simulator, the current manner in which CIlib’s internal threading works could result in simulations actually slowing down.
This has never really been an issue in the past. Lately, however, we are seeing that it is becoming something which is more and more important. The generic nature of CIlib is a great benefit to all, but with such a generic nature, it often means that we need to extra careful with regards to performance.
In the past that was something that we didn’t really focus on, but we have spent some time lately making sure that the performance is better. To that end, the latest changes are looking very promising. There is currently some internal testing going on, with the aim to include these new performance changes in the 0.7.4 release. There is, however, something to note regarding these changes: Your XML specifications will need to be adapted slightly to cater for the rearrangement of logic.
These specification changes do not impact the algorithm or problem definitions at all, however, some changes are required on the measurement and simulation tags. More details will be provided once the API is a little more stable. For the meantime, if you have the itch to have a look, feel free to get a clone of the repository and checkout the pu branch.
Feedback is always welcome