ddence with each row as cyclical buffer

6 views
Skip to first unread message

Pranas

unread,
Oct 6, 2017, 12:16:08 AM10/6/17
to efficient-java-matrix-library-discuss
Hello Dev,

I'm thinking about creating time series (with limited history) specific data structure implementing moving window for each row.

The DMatrix1Row looks like good candidate for such impl, but index retrieval is inlined (duplicate) in multiple places. 
Is there good reason (not sure if it helps JIT) to inline and duplicate code? 

I'm thinking about packing multiple such structures to single double array. i.e. adding offset for each of the new shell matrix objects. 
Motyvation: It would minimise need for GC to deal with large number of objects.

Do you have some advices (based on previous experience) for such impl? Would you consider back contributions?

Thanks
P

Peter A

unread,
Oct 6, 2017, 5:35:13 PM10/6/17
to efficient-java-mat...@googlegroups.com
Hi Pranas,

Not sure I understand everything you're asking. However I can describe why there's code duplication. When EJML was first developed profiling was used to determine the best strategy. It was found that calling functions introduces noticeable overhead. Even in simple cases like get( index ) { return data[i];}  Also on embedded platforms JVMs do a much worse job optimizing code and the closer you can make it to being optimized the faster it runs.

- Peter

--
You received this message because you are subscribed to the Google Groups "efficient-java-matrix-library-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to efficient-java-matrix-library-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
"Now, now my good man, this is no time for making enemies."    — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.
Reply all
Reply to author
Forward
0 new messages