flat assembler
Message board for the users of flat assembler.

Index > Main > Good / fast PRNG, for floats bonus

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 24 Jan 2017, 19:55
To be honest, I don't know how "fast"/"good-quality" these are (I don't have a machine I can test this on) but from a small and simple perspective the likes of chained AES or SHA instructions should provide a good sequence from a single instruction. The result could provide multiple random values per iteration and can then be normalised/rebased accordingly.
Code:
aesenc xmm0,xmm0
cvtdq2ps xmm1,xmm0
; ?
; profit    
Something along these lines..may need some tweaking.
Post 24 Jan 2017, 19:55
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2565
Furs 25 Jan 2017, 13:41
Yes, thanks, I'm going to look into aesenc and others just for fun even if I don't end up using them (I guess they aren't so fast). Because I'm not really in the loop with all the new instructions so it's good exercise.
Post 25 Jan 2017, 13:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.