Got tired of having to use slow interface code, just to compare 2 integers in my generic code.

Got tired of having to use slow interface code, just to compare 2 integers in my generic code. 
With the new compiler intrinsics in XE7 there's finally an option to do better. 

Now I get 4 lines of inlined assembly to compare 2 integers, instead of 37 in my code and about 50 in futher calls. 

Perhaps it's time to revive the fastcode project :-)
Have a look at: See: https://github.com/JBontes/FastCode
to see the new Comparers.

Note that I've not had time to test everything, but I'll add a full suite of test cases in due course.
https://github.com/JBontes/FastCode

Comments

  1. Busy rewriting the FastDefaults unit. Stefan's integer test is now 10x faster instead of 2x and compiles to just a single `sub eax,edx` instruction.

    ReplyDelete
  2. I am worried that I will be jumped by a wall of asm code when you push your changes ;)

    ReplyDelete
  3. Stefan Glienke
     Well, emba never updated the original FastCode asm for X64, so lots 64 bit code is PurePascal, where a updated asm would be more suited. First need to complete the testsuite to make sure no silly code leaks out.

    ReplyDelete

Post a Comment