Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » External resources » Bit Twiddling Hacks
Bit Twiddling Hacks [message #29869] Thu, 25 November 2010 16:33 Go to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
http://graphics.stanford.edu/~seander/bithacks.html

This is a quite interesting collection of small optimized functions by Sean Eron Anderson.



Regards,
Novo
Re: Bit Twiddling Hacks [message #29871 is a reply to message #29869] Thu, 25 November 2010 18:30 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Novo wrote on Thu, 25 November 2010 16:33

http://graphics.stanford.edu/~seander/bithacks.html

This is a quite interesting collection of small optimized functions by Sean Eron Anderson.

Quite interesting reading Smile Thanks.
icon14.gif  Re: Bit Twiddling Hacks [message #29873 is a reply to message #29871] Thu, 25 November 2010 21:44 Go to previous messageGo to next message
Didier is currently online  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Very interesting tricks when you want high data throughput and want to avoid branching !
Thank's

[Updated on: Thu, 25 November 2010 21:45]

Report message to a moderator

Re: Bit Twiddling Hacks [message #30033 is a reply to message #29873] Sat, 04 December 2010 16:35 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

May be it will be good idea to include these functions to U++. Some of them are great.
Re: Bit Twiddling Hacks [message #30060 is a reply to message #29869] Mon, 06 December 2010 09:00 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
sent an improvement for the last one couple of days ago and no answer yet... :/

(oh, I mean, I really did love to read trough them, I even learned couple of new tricks, otherwise I wouldn't dare to work on any improvement, so this is the way how I say I like something... I send improvement, hehehe Very Happy )

My version of NextBitPermutation if you are curious: Smile
unsigned int t = (v | (v - 1)) + 1;
w = t | ((v^t) >> (__builtin_ctz(v) + 2));
Previous Topic: Timed demos
Next Topic: Software optimization resources
Goto Forum:
  


Current Time: Thu Mar 28 21:44:25 CET 2024

Total time taken to generate the page: 0.01071 seconds