11
votes
Vote UpVote

Pimp your random numbers with XorShift!

DelphiTools – A 64bit XorShift is now used to generate random numbers in DWScript, and there is a now a separate random number generator per-execution, which is auto-randomized when an execution is created. Previously, the RTL random generator was used, this was “okay” when you had only one script using random numbers at a time, but multiple scripts running at the same time would interfere (Randomize calls would affect each others f.i.), and Random isn’t really thread-safe. Performance fo XorShift is roughly comparable to the Delphi RTL’s linear congruential generator, but with much ...
Favorite? Off-Topic? Eric @ 2011-12-13 10:07

Statistics

Visits: 769
Votes: 11
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Ericc
Jan Derk
Jeroen Pluimers
knight_killer
Leif Uneus
Linas
Simon J Stuart
TOndrej
Yogi Yang
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)