Sometimes, compilers are smart enough to generate codes for avx, gcc has extension for vector data type which may be hopefully capable of taking advantage of simd, see blas subroutine in J engine source.
On Nov 8, 2017 9:56 PM, "Don Guinn" <dongu...@gmail.com> wrote: > Yes, Raul. It was a stupid J expression. Wasn't thinking about what I > wrote, but I was thinking about what I was told when I first learned APL, > "Often it is better to go ahead and calculate a result, then throw it away, > than try to figure out if you really need the calculation". > > I brought up AVX because it makes that observation even more true. Working > with the IBM 370 vector unit many years ago, it could process arrays at > what was an unbelievable speed at that time. Of course, not any more. But > it was extremely important to "not interrupt the pipeline". Setting up a > vector unit operation was expensive but once going it flew. > > It presented a dilemma because the setting up an instruction was expensive > and it didn't work well for short vectors. But it was implemented into > APL2. It worked well, but made even more true what I first learned in APL > for the 1130, where (I think) the game of APL one-liners began. > > Hopefully, the instruction setup for AVX is easier and more efficient than > the 370 vector unit, but even so, it is probably very important to not > interrupt the instruction and let it run on as long of vectors as it can. > So, I was trying to illustrate the effort to remove numbers from the vector > that wouldn't be used in the final result. It would be so much trouble and > require so much compressing and expanding that it would be better to "just > calculate the result and throw it away later". > > The idea of skipping calculation that will never be used is useful in some > cases, but can easily spend more time determining whether to skip than > going ahead with the calculation. This is particularly true in the world of > arrays. Making it an important requirement only works in a scalar world, > and is questionable even then and easily made incorrect as hardware is > enhanced. > > On Wed, Nov 8, 2017 at 2:15 AM, Erling Hellenäs <erl...@erlinghellenas.se> > wrote: > > > I don't need anything. The discussion was not about any question of mine. > > The discussion ended, so I guess the people having questions got their > > answers. /Erling > > > > > > Den 2017-11-08 kl. 10:02, skrev Raul Miller: > > > >> Please let me know what you need beyond the information I laid out in > >> http://jsoftware.com/pipermail/programming/2017-November/049599.html > >> > >> Thanks, > >> > >> > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm