[Issue 11597] Speed up std.random.dice

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 24 16:53:00 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11597


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2013-11-24 16:52:57 PST ---
(In reply to comment #0)
> Currently, dice is a bit slower than it could be. It would be nice if dice used
> a binary search to speed up the search for which element the chosen point
> corresponds to.

See Vose's Alias Method:
http://www.keithschwarz.com/darts-dice-coins/

But regarding dice speed see Issue 5849, so perhaps this is a dupe (or you can
move your requests there).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list