This is the Linux app named CountBitsSet whose latest release can be downloaded as countbitsset-code.tar.bz2. It can be run online in the free hosting provider OnWorks for workstations.
Download and run online this app named CountBitsSet with OnWorks for free.
Follow these instructions in order to run this app:
- 1. Downloaded this application in your PC.
- 2. Enter in our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 3. Upload this application in such filemanager.
- 4. Start the OnWorks Linux online or Windows online emulator or MACOS online emulator from this website.
- 5. From the OnWorks Linux OS you have just started, goto our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 6. Download the application, install it and run it.
SCREENSHOTS
Ad
CountBitsSet
DESCRIPTION
I was curious how much better the Algorithms, pointed out by BitTwiddling Hacks, perform than a simple Lookup Table approach...
Now I think, perhaps my little investigation is interesting for others too...
PS: the parallel counting Algo is about 35% faster on average on my computers than the simpel LUT solution. Also this shows nicely how different a human brain compatible solution is to a binary machine optimal solution :-)
PS: see result.txt in Code to see various runs with different compilers and compiler switches
Features
- C++
- CountBitsSet, PopulationCount.Integer Hamming weight
- simple Benchmark
Audience
Education, Developers
User interface
Console/Terminal, Command-line
Programming Language
C++
This is an application that can also be fetched from https://sourceforge.net/projects/countbitsset/. It has been hosted in OnWorks in order to be run online in an easiest way from one of our free Operative Systems.