I'm writing up an appendix on Vector and Matrix. In the course of this, I noticed a big problem with VectorWrtiable. It is pretty glaringly un-thread-safe. It caches, in a static member, the class of the vector to be read. The read method is not synchronized. Oops.
Synchronization fixes this, but also introduces an unnecessary bottleneck in the read method. I'm forced to wonder -- why does this serialized representation of a vector vary at all? I can understand why the best approach for representing a dense or sparse vector in memory varies, but those concerns do not apply to a serialized form. The sparse representation is the only reasonable one. Why would it vary? I'd like to really fix this by unifying representation of vectors on disk accordingly. Am I missing something? Sean