SarK0Y Posted February 15, 2013 Share Posted February 15, 2013 Good Time to all, Amici(Friends).Here, i'd like to discuss how to reduce conditional branches in the code. 1st of the all, i would like to share some tricks. Their description is here -----------------------Thanks in Advance for attention of Yours. Link to comment Share on other sites More sharing options...
Enthalpy Posted February 15, 2013 Share Posted February 15, 2013 It is sometimes useful to suppress IF, and is accordingly already done. Essentially in vector processors, which have one instruction unit hence can't reasonably branch depending on tests on every data processed in parallel. Programmers used similar tricks very early, but now these processors have conditional instructions, dispatched once by the single instruction unit to all processing units, to act differently on data based on idividual conditions. A typical such instruction is a conditional store. Link to comment Share on other sites More sharing options...
SarK0Y Posted February 15, 2013 Author Share Posted February 15, 2013 It is sometimes useful to suppress IF, and is accordingly already done. Essentially in vector processors, which have one instruction unit hence can't reasonably branch depending on tests on every data processed in parallel. Programmers used similar tricks very early, but now these processors have conditional instructions, dispatched once by the single instruction unit to all processing units, to act differently on data based on idividual conditions. A typical such instruction is a conditional store. Nothing is new at all under Moon Actually, it'd be useful, if IF-structure could be converted into such forms with compilers however, in many cases, it's quite tricky to overcome IFs. Link to comment Share on other sites More sharing options...
SarK0Y Posted July 21, 2014 Author Share Posted July 21, 2014 Hi there, my Friends, i need your contribution to benchmark this sorting algo (http://alg0z.blogspot.ru/2014/07/fastsortfsort-no-if-vs-qsort.html). Thanks a lot in Advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now