Re: m.*! not native?
Tunc Simsek <[email protected]>
| Newsgroups | gmane.lisp.matlisp.user |
|---|---|
| Message-ID | <[email protected]> |
what do you mean by native. both allegro and cmucl produce native code. looking at mtimes.lisp; it looks like all the declarations are in place for m.*! so the only reason that it may be slow is if the optimization flags were not set during compilation. I personally never checked that they are. It is worth checking this. Otherwise, a single loop in lisp with full declarations should not be orders of magnitude slower than fortran. -- Tunc Jefferson Provost wrote: > > Hi, > > I was profiling some of my code yesterday, and noticed that a single m.*! > call was taking more than 90% of the run time for my program. After > poking around a little in mtimes.lisp, it seems that m.*! isn't native. > Is this true? > > I don't know BLAS very well. Is there no way to do element-wise > multiplication in BLAS? The non-native routine is a couple of orders of > magnitude slower than native routines of the same complexity: (e.g. m.+! > or outer-product of vectors). > > If BLAS can't do this, it seems like it would be an easy Fortran routine > to write. I could do it, though I'm not familiar with how to do foreign > functions in Allegro or cmucl. > > Jeff > > _______________________________________________ > Matlisp-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/matlisp-users