Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
eru
on Sept 9, 2019
|
parent
|
context
|
favorite
| on:
Popcount CPU instruction
You are a wasting a lot of random bits this way, don't you?
adtac
on Sept 9, 2019
|
next
[–]
Not if you already have 2^n bits at hand. In fact, if you have 2^n bits of entropy, popcount is probably more efficient than generating n more bits randomly.
JoachimSchipper
on Sept 9, 2019
|
prev
[–]
Sure, but generating random bits is fast with e.g. AES-NI, RdRand or a software implementation of e.g. ChaCha.
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: