Re: [ojAlgo-user] Performance tests
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <ap...@op...> - 2007-05-18 11:09:45
|
Niko Brummer wrote: > Hi Anders > > I have a general comment about performance when working with large matrices. > > ************************************************************************ > * It matters a lot in what order you access the data in memory. * > ************************************************************************ > > I have done similar matrix multiplication experiments in Java, with > similar results. Although in Java you don't have very good control > over how and where matrix elements are stored in memory, it is still > often possible by re-arranging the order in which elements are > accessed, to speed up things considerably. I have spent many hours performance tweaking ojAlgo. (Performance has improved a lot with the last handful of releases.) Though I am beginning to get a feeling for what is good/bad I cannot say I know how to write top performing code. I have to experiment, and tiny changes can make a huge difference. Yes, I have also learned, that thinking about in what order you access array elements is very important. Doing matrix decompositions, in place, is particularly difficult. /Anders |