blangSDK
blangSDK copied to clipboard
Improve performance of cloning
- Some immutable stuff to mark for shallow copy, e.g. arrays of integers for sampler cache
- Datasets
- Plates, etc [mark as immutable as well]
- Parallelize!
Note: performance of Cloner vs. Kryo
Kryo 1 88s
Kryo 2 (global) 45s
Cloner 52s
Cloner 2 (glob) 49s
Basically, modify Cloner (add something like private boolean isImmutable(final Class<?> clz) but with object instead), which check if the node is observed (or rather if there is an observed under) to decide if should do deep or shallow. - WARNING: should be coupled with copying set of observed nodes. Arg..