Re: [LAD] How do you improve optimization for integer calculations?

2019-04-14 Thread Nikita Zlobin
On Sun, 7 Apr 2019 22:27:34 +0200 Maarten de Boer wrote: > > Looks like you propose to use intel-specific intrinsics. I already > > looked gcc docs in hope to find something similar, but only found > > vectorization section, from C extensions. Hoped to see something > > probablt gcc-specific, but

Re: [LAD] How do you improve optimization for integer calculations?

2019-04-10 Thread Nikita Zlobin
In Sun, 7 Apr 2019 23:06:45 +0500 Nikita Zlobin wrote: > I really did not recognize that nasty trick, clearing xmm0 :). > Also i understood, why SSE can't be used there. Without integer > division support it is undoable with SSE - replacing with > multiplication means conversion to float. > I re

Re: [LAD] How do you improve optimization for integer calculations?

2019-04-08 Thread Nikita Zlobin
In Sun, 7 Apr 2019 22:27:34 +0200 Maarten de Boer wrote: > > Looks like you propose to use intel-specific intrinsics. I already > > looked gcc docs in hope to find something similar, but only found > > vectorization section, from C extensions. Hoped to see something > > probablt gcc-specific, but

Re: [LAD] How do you improve optimization for integer calculations?

2019-04-07 Thread Maarten de Boer
> Looks like you propose to use intel-specific intrinsics. I already > looked gcc docs in hope to find something similar, but only found > vectorization section, from C extensions. Hoped to see something > probablt gcc-specific, but not intel-spec. I am not sure if I understand what you mean, but

Re: [LAD] How do you improve optimization for integer calculations?

2019-04-07 Thread Nikita Zlobin
In Sun, 7 Apr 2019 17:13:31 +0200 Maarten de Boer wrote: > Hi, > > > > […] > >col[0] /= 9.0, col[1] /= 9.0, col[2] /= 9.0, col[3] /= > > 9.0; 0x5a39 pxor %xmm0,%xmm0 > > […] > > > > Notice, how line, containing chain of divisions, is compiled to > > single sse operation. > > I

Re: [LAD] How do you improve optimization for integer calculations?

2019-04-07 Thread Maarten de Boer
Hi, > […] >col[0] /= 9.0, col[1] /= 9.0, col[2] /= 9.0, col[3] /= 9.0; > 0x5a39 pxor %xmm0,%xmm0 > […] > > Notice, how line, containing chain of divisions, is compiled to single > sse operation. I don’t see any SSE operation here. The pxor is just to zero the xmm0 register. It’s

[LAD] How do you improve optimization for integer calculations?

2019-04-07 Thread Nikita Zlobin
Hello. I just have attempt, writing serious application, considering language (C), tookit (gtk3, cairo, pango, etc) and that it is audio app. Besides that many audio things use simple "float" for audio data, i noticed some posts, where tension towards integer math appeared. While it is not my case