home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,325 of 243,242   
   Mikko to Alexis   
   Re: "The Weird Concept of Branchless Pro   
   16 Oct 25 12:43:22   
   
   From: mikko.levanto@iki.fi   
      
   On 2025-10-16 09:13:48 +0000, Alexis said:   
      
   > Thought this might interest people here.   
   >   
   > "If you came for readable code, sorry, branchless programming is   
   > basically code golf with caffeine ...   
   >   
   > "By rewriting conditional logic into arithmetic and bit operations, or   
   > using CPU instructions like cmov, we let the CPU chew through code   
   > without pausing to guess. It’s smoother, faster, and often more   
   > deterministic, which is crucial in performance-critical or   
   > side-channel-resistant scenarios (looking at you, cryptography)."   
   >   
   >   https://sanixdk.xyz/blogs/the-weird-concept-of-branchless-programming   
   >   
   > HN discussion:   
   >   
   >   https://news.ycombinator.com/item?id=45405750   
   >   
   >   
   > Alexis.   
      
   A program that is branchless may still have branches wnen translated.   
   Even soomething as simmple as   
      
     long i;   
     ...   
     i++;   
      
   may have a branch in the machine code:   
      
     inc low part of i   
     if low part of i != 0 go to L   
       inc high part of i   
   L:   
      
   --   
   Mikko   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca