Fröhling

Niels Fröhling about [X]HTML, JS and technical tidbits

  • Home
  • About
February 1st, 2009

Uh, more on compilers

Ethatron in Optimizations

Uh, I don’t know how I may introduce this one. I don’t know if I should call it a horrific failure or just hilarious. This is what comes out of VS2008 for a signed short division:
symSend = mergedNGram % numCases;
mergedNGram /= numCases;
The produced code:

00024 0f bf 86 2c 04
[...]

Weiterlesen...

Kein Kommentar
December 20th, 2008

Peephole optimization, what’s that?

Ethatron in Optimizations

You never stop learning, I just explored how I can force a compiler into producing the sbb op on x86. It’s quite difficult actually, most of them produce for example cmp + seta + neg for the term -(a > b). In fact the only deterministic behaviour is with a very special ternery term (a [...]

Weiterlesen...

Kein Kommentar
July 15th, 2008

MMX unsigned 16×16 multiply

Ethatron in Optimizations

Havn’t found this anywhere, so I had to do it myself. The title says it all, so here it is without drama:
// mm7 = 0×8000 0×8000 0×8000 0×8000
// mm3 = 0×7FFF 0xFFFF 0×7FFF 0xFFFF
// mm5 = 0×7FFF 0×7FFF 0xFFFF 0xFFFF

movq mm6, mm7
pand mm7, mm5 /* b ? 0 | 0×8000 */
pand mm6, mm3 /* a ? 0 | 0×8000 */
pxor mm5, [...]

Weiterlesen...

Kein Kommentar

Tags

  • Algorithms Assembler bash C++ Homemade Javascript MMX Optimization Rants TYPO3

Categories

    • Applications
      • TYPO3
    • TidBits
      • Algorithms
      • Approximations
      • Equivalence
      • Fixes
      • Javascript
      • Optimizations
      • Scripts
    • Uncategorized

Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Recent Posts

    • jQuery’s animate is short-thought
    • movntq alignment
    • OP-equivalent series (pavgd)
    • OP-equivalent series (psubq)
    • OP-equivalent series (paddq)

 

  • February 2012
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  

Archives

    • August 2010
    • April 2010
    • February 2010
    • January 2010
    • July 2009
    • February 2009
    • December 2008
    • November 2008
    • August 2008
    • July 2008
    • May 2008
© 2010 Wired by Fröhling
Design von Dezzain Studio
Übersetzt von Htwo
Nature Pictures | Bamboo Blinds