[squeak-dev] The Trunk: Kernel-ul.961.mcz
Levente Uzonyi
leves at elte.hu
Tue Oct 20 16:03:28 UTC 2015
That's the most actual use-case, but I've been thinking about creating
some primitives which would serve as an image-wide (CS)PRNG. Why?
1. primitives are faster; in case of RNG, they can be a lot faster (2-3
magnitudes)
2. there's no concurrency issue with primitives - all image-side code can
share the same PRNG.
Filling a ByteArray with random bytes would be one of the primitives.
Another one would be generating a random integer between two given
integers. And the third would be generating a random Float [0..1).
Levente
On Tue, 20 Oct 2015, Nicolas Cellier wrote:
>
>
> 2015-10-20 17:49 GMT+02:00 Ben Coman <btc at openinworld.com>:
> On Tue, Oct 20, 2015 at 1:40 PM, <commits at source.squeak.org> wrote:
> > Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
> > http://source.squeak.org/trunk/Kernel-ul.961.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Kernel-ul.961
> > Author: ul
> > Time: 20 October 2015, 7:39:47.9 am
> > UUID: ce0d735e-07a6-42e8-a789-40a8776796f4
> > Ancestors: Kernel-ul.960
> >
> > Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes
> efficiently. The method was extracted from #nextLargeInt:, which is its only user for now.
>
> I'm curious what the use case for this is.
> cheers -ben
>
>
> for example, generating UUID without the holly plugin...
>
>
More information about the Squeak-dev
mailing list
|