Popcnt32
Calculate population count (popcnt) on a 32-bit number, branch free
Install / Use
/learn @emilbayes/Popcnt32README
popcnt32
Calculate population count (popcnt) on a 32-bit number, branch free
Usage
var popcnt32 = require('popcnt32')
popcnt32(0b1) // 1
popcnt32(0b1000001) // 2
API
const ones = popcnt32(int)
Return number of 1-bits in int. Int is implicitly cast to a 32-bit unsigned
int. This means popcnt32(-1) === 32 while popcnt32(1) === 1
Install
npm install popcnt32
License
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
