AMD-64 optimizations, some (new) code

Torbjorn Granlund tege at
Tue Sep 27 20:15:28 CEST 2005

Ashod Nakashian <saghmos at> writes:

  Obviously. I assumed you had partially ported/optimized code that could 
  be released sooner. This might still be true, but you might have other 
My motto for my work on GMP is "pauca sed matura".  :-)

  > But I don't agree that the main value of GMP 5 would be AMD64
  > assembly code.  Most of the speedups will come from C code
  > improvements.
  No, I meant that unless the new C code is ALSO optimized (for the many 
  different platforms that is used) the new algorithms will probably not 
  provide that much improvement over the old, but well optimized, version 
  thus making the new C code less interesting. Of course I assume the 
  current algorithms are near optimal, with good assembly routines that 
  provide in some cases many times the speed of the same algorithm in C. 
  In these cases, a very well optimized assembly code with worse algorithm 
  will probably provide equal or better performance than the new and 
  better algorithm in C.
All wrong.

I am not replacing "old, but well optimized" code with new,
poorly optimized code.  I am replacing old code with new, better
optimized code.

The current algorithms are not "near optimal" in all cases.  The
stated goal of GMP 5 is to make that become the case.

  Meanwhile, we don't have AMD64 optimized code, forget about any new 
  algorithm/improvemtns; We don't have the basic perfomance expected from 
  a truly giant workhorse. I think in this case, at least some, will value 
  basic assembly code with 2-3x improvement over the current C code TODAY, 
  than new Algorithms/C-code next year. Thus, I think during this time, 
  most will eventually type their own assembly or port the existing ones, 
  thus making your (and other volunteer's) effort of much less value, 
  which is very sad and wastful.

Sorry, you won't succeed in talking me into releasing my AMD64
code before I think it is ready.  :-|


More information about the gmp-discuss mailing list