Daniel Lemire's blog
lemire.me
Add New Subscription
Post
(required) *
Required; the Post you're subscribing to.
Comment
— All Comments/Replies —
Jun 27th, 2016 3:37 pm — "Marcel Popescu" writes: I’m missing something… are you sayin[...]
Jun 27th, 2016 4:41 pm — "Daniel Lemire" writes: I am not saying that x % N is equal to ([...]
Jun 27th, 2016 6:14 pm — "Leonid Boytsov" writes: It is not, unless you have numbers unifo[...]
Jun 27th, 2016 6:16 pm — "Leonid Boytsov" writes: PS: Especially, if you use it for hashin[...]
Jun 27th, 2016 6:29 pm — "Leonid Boytsov" writes: On a second thought, if modulo reduction[...]
Jun 27th, 2016 7:22 pm — "Preston L. Bannister" writes: To re-phase Daniel: We want to generate [...]
Jun 27th, 2016 7:23 pm — "Daniel Lemire" writes: If you have, say, 31-bit integers, inste[...]
Jun 27th, 2016 7:28 pm — "Daniel Lemire" writes: A good hash function should be regular. [...]
Jun 27th, 2016 7:31 pm — "Daniel Lemire" writes: If N is small compared to 2^32, then I s[...]
Jun 27th, 2016 7:45 pm — "Daniel Lemire" writes: Yes, Leonid, I suspect that you are quit[...]
Jun 27th, 2016 8:24 pm — "Leonid Boytsov" writes: What is the cost of computing a good has[...]
Jun 27th, 2016 8:25 pm — "Leonid Boytsov" writes: by doing just ID * some perhaps prime nu[...]
Jun 27th, 2016 9:59 pm — "Daniel Lemire" writes: What is the cost of computing a good has[...]
Jun 28th, 2016 12:12 am — "Leonid Boytsov" writes: Agree. Good point about N known in advance.
Jun 28th, 2016 1:07 am — "KWillets" writes: It’s a fairly simple proof. You stretc[...]
Jun 28th, 2016 2:40 am — "Daniel Lemire" writes: Thanks. I had a relatively short proof t[...]
Jun 28th, 2016 3:32 pm — "Daniel Lemire" writes: I have updated my blog post with a more [...]
Jun 28th, 2016 6:07 pm — "KWillets" writes: Thanks — I actually thought it through[...]
Jun 29th, 2016 12:54 pm — "Maxim Egorushkin" writes: Note that expression `((uint64_t) x * (u[...]
Jun 29th, 2016 3:19 pm — "Daniel Lemire" writes: That’s a very good point. I am somewha[...]
Jun 29th, 2016 3:39 pm — "Daniel Lemire" writes: For the record, something like this coul[...]
Aug 12th, 2016 2:28 am — "Francois Saint-Jacques" writes: For some reason, gcc does the correct th[...]
Aug 12th, 2016 2:29 am — "Francois Saint-Jacques" writes: See https://godbolt.org/g/kZ91Yu .
Oct 19th, 2016 6:40 pm — "KWillets" writes: Doing this for floats (random within [0,[...]
Feb 28th, 2017 6:48 pm — "Pablo" writes: Since I don’t read math proofs daily, [...]
Feb 28th, 2017 7:23 pm — "Daniel Lemire" writes: Yes, for some fuzzy notion of “equival[...]
Mar 21st, 2017 2:37 am — "Chad Harrington" writes: This is a godsend for FPGAs. Modulus by [...]
May 26th, 2017 12:03 am — "Felix Chern" writes: I created a similar approach to fast ran[...]
Jun 21st, 2017 9:55 am — "Maxim Egorushkin" writes: Would byte-swapping x help to preserve l[...]
Jun 21st, 2017 10:43 am — "Maxim Egorushkin" writes: mulx instruction would be ideal here: ta[...]
Dec 21st, 2017 6:57 am — "Joost VandeVondele" writes: This also made it in the world’s stron[...]
Dec 22nd, 2017 10:55 pm — "Daniel Lemire" writes: That’s amazing.
Jul 12th, 2018 4:23 pm — "TQTrung" writes: I’m using x64 laptop-windows 10 and tr[...]
Jul 12th, 2018 4:55 pm — "Daniel Lemire" writes: Can you share the code that gives you al[...]
Jul 12th, 2018 4:58 pm — "TQTrung" writes: include using namespace std; uint32_t re[...]
Jul 12th, 2018 5:02 pm — "Daniel Lemire" writes: What do you expect reduce(12,7) to do?
Jul 12th, 2018 5:04 pm — "TQTrung" writes: I tried many different values as 20, 33,[...]
Jul 12th, 2018 8:12 pm — "Daniel Lemire" writes: Did you try random 32-bit numbers? Pleas[...]
Jul 13th, 2018 1:52 am — "TQTrung" writes: Wow! Thank you very much!
Aug 2nd, 2019 12:19 pm — "Thorham" writes: Isn’t this basically fixed point arith[...]
Aug 2nd, 2019 2:56 pm — "Daniel Lemire" writes: Isn’t this basically fixed point arith[...]
Oct 7th, 2019 9:48 am — "Cyril" writes: Unless x * N > (1<<shiftAmount) the resu[...]
Oct 8th, 2019 6:12 pm — "Daniel Lemire" writes: Note that the trick described in this bl[...]
Dec 27th, 2019 5:40 pm — "L. C." writes: This works great! Thank you!
Jan 30th, 2020 8:16 pm — "Piotr Grochowski" writes: Ok so what if the RNG output is 64-bit. [...]
Jan 31st, 2020 11:16 am — "Piotr Grochowski" writes: So, you can’t do this method on 64-bit[...]
Jan 31st, 2020 2:20 pm — "Daniel Lemire" writes: On 32-bit systems, there are many optimi[...]
Feb 17th, 2020 1:56 pm — "hlide fremen" writes: However, there are real-world examples w[...]
Feb 17th, 2020 2:17 pm — "Daniel Lemire" writes: @hlide Yes, though being limited by powe[...]
Apr 3rd, 2020 9:56 pm — "Anonymous" writes: Why not do real modulo though? X % Y = ([...]
Apr 3rd, 2020 10:07 pm — "Daniel Lemire" writes: Yes, you can do this as well, though it [...]
Jun 26th, 2020 2:10 pm — "Bo" writes: Thanks. This is amazingly fast in my cas[...]
Jun 27th, 2020 2:29 am — "Bo" writes: Correction. There was a bug in my implem[...]
Email
(required) *
First Name
(required) *
Last Name
Deliver
(required) *
instantly
hourly
daily
weekly
Any value that is not
instantly
results in a digest instead of instant notifications.