- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I did some performance tests with multiplication.
There is no dedicated operation for squaring, and multiplication does not seem to detect squaring situations (identical operands for multiplication)
It should be expected that a dedicated implementation of squaring provides a significant performance benefit.
(at least this is my experience with own implementations of grammar school multiplication, Karatsuba, FFT).
Questions:
- is there a hidden feature in MKL/GMP for optimized squaring?
- are there plans for future versions of MKL to improve squaring?
There is no dedicated operation for squaring, and multiplication does not seem to detect squaring situations (identical operands for multiplication)
It should be expected that a dedicated implementation of squaring provides a significant performance benefit.
(at least this is my experience with own implementations of grammar school multiplication, Karatsuba, FFT).
Questions:
- is there a hidden feature in MKL/GMP for optimized squaring?
- are there plans for future versions of MKL to improve squaring?
Lien copié
3 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Sorry, Vladimir is correct -- I misunderstood the question and, therefore, my posting should be removed.
I do not know how to erase a posting, so I edited the posting, removed the irrelevant content and substituted this retraction.
I do not know how to erase a posting, so I edited the posting, removed the irrelevant content and substituted this retraction.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Franz,
Thank you for your interest in our library and particularly in its multi-precision functionality.
In one of our future versions there will be a significant speed-up of multiplication, including the squaring case.
We do not encourage using any undocumented "hidden features" of MKL. If you feel that some feature is missing, please do not hesitate to submit a feature request through premier.intel.com.
Best regards,
Vladimir
Thank you for your interest in our library and particularly in its multi-precision functionality.
In one of our future versions there will be a significant speed-up of multiplication, including the squaring case.
We do not encourage using any undocumented "hidden features" of MKL. If you feel that some feature is missing, please do not hesitate to submit a feature request through premier.intel.com.
Best regards,
Vladimir
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Quoting mecej4
Please give some examples. Here is a counterexample (with default precision -- did you mean to exclude this case?) :
- subroutinesub(x,y)
- real,intent(in)::x
- real,intent(out)::y
- y=x*x
- return
- endsubroutinesub
[fortran]subroutine sub(x,y)compiles to
real, intent(in) :: x
real, intent(out) :: y
y=x*x
return
end subroutine sub[/fortran]
- moveax,DWORDPTR[4+esp]
- movedx,DWORDPTR[8+esp]
- movssxmm0,DWORDPTR[eax]
- mulssxmm0,xmm0
- movssDWORDPTR[edx],xmm0
- ret
[bash] mov eax, DWORD PTR [4+esp]and, to me, it seems clear that 'mulss xmm0,xmm0' captures the essence of 'square the operand'.
mov edx, DWORD PTR [8+esp]
movss xmm0, DWORD PTR [eax]
mulss xmm0, xmm0
movss DWORD PTR [edx], xmm0
ret[/bash]
This "counterexample" is not quite relevant to the subject of this thread since the original question was about multi-precision integer arithmetic.
Best regards,
Vladimir
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable