- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page