Bit Twiddling Hacks

The cluster centers on sharing and discussing bit manipulation techniques, bitwise operations for performance optimization, and resources like the Stanford 'Bit Twiddling Hacks' page and 'Hacker's Delight' book.

📉 Falling 0.4x Programming Languages
3,801
Comments
20
Years Active
5
Top Authors
#4638
Topic ID

Activity Over Time

2007
6
2008
13
2009
57
2010
88
2011
106
2012
97
2013
139
2014
142
2015
139
2016
239
2017
216
2018
196
2019
208
2020
258
2021
330
2022
507
2023
375
2024
354
2025
317
2026
14

Keywords

e.g DIV ALU SADD MXOR UTF8 lemire.me googleblog.com AVX2 stanford.edu bit f1 unsigned instruction operations tricks shift hacks 32 instructions

Sample Comments

threatofrain Apr 12, 2022 View on HN

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

TonyTrapp Dec 7, 2022 View on HN

Relevant link: https://graphics.stanford.edu/~seander/bithacks.html

bhickey Aug 30, 2015 View on HN

You've probably see this as well: https://graphics.stanford.edu/~seander/bithacks.html

_urga Feb 10, 2012 View on HN

64-bit bitwise operations would be a big help.

mehrdadn Sep 30, 2020 View on HN

See https://graphics.stanford.edu/~seander/bithacks.html

xjay May 26, 2024 View on HN

See also: Bit Twiddling Hackshttps://graphics.stanford.edu/~seander/bithacks.html

bastawhiz Apr 2, 2022 View on HN

It's two bitwise operations

Hydraulix989 Nov 11, 2023 View on HN

Maybe bitwise operations instead of arithmetic?

fla Nov 13, 2014 View on HN

mostly a matter of making bitwise & arithmetic operations in parallel over integers (shift, xor, add etc..)

amelius Dec 7, 2022 View on HN

Shouldn't processors have a special instruction for this operation?