mschuene/core.matrix — pull request #3 by radoye (2014-04-07 07:07:20+00:00)
Title: scalar typed array generator = stag

See if you and Mikera like this better. It is pretty much along the lines of what I need.
Any hints on "wrapped" (read below) performance? Any comparisons with your dynamic approach?

Template: stag/wrap_pv_generic.clj.
Instantiations: impl/stag_pv_doubles.clj, impl/wrap_pv_doubles.clj, impl/wrap2_pv_doubles.clj.
Usage: test_gen_reals.clj.

Some testing was done:

0) When instantiated with IPersistentVector (as array type), it performs as well as persistent-vector implementation itself. The difference is: all type hints, types and scalar operations are instantiation parameters. (I had to comment out persistent-vector.clj itself to prevent it from being loaded and taking over depending on the order of tests). I can't seem to find any difference between generated and hand-written nested vectors performance.

1) If nested vectors are wrapped into a new deftype and then instantiated, I see ~2.5x slowdown. But, for me important, I can run with different scalar types in matrices, all backed by IPersistentVector internally, and not clashing with the non-wrapped version.

2) How does this relate to NDArray?