Eric Veith1 wrote:
Hello list,
this is rather unusual: I want a chunk of random garbage, and I want it
fast. The background is that I have a streaming test, and to run into some
intelligent read-ahead/write-behind/caching algorithm, I need random
stuff. /dev/null is fast, but obviously won't do it. /dev/urandom is too
slow. In C, I once resorted in a similar case to using malloc() to get
some portion of memory without initializing it and writing that, but Perl
doesn't let me access malloc(), at least not via POSIX. I already tested
something like "rand x 100", but that's too slow, too. :-/
Any ideas are greatly appreciated.
Thanks in advance,
Eric
--
Eric MSP Veith <eric.ve...@de.ibm.com>
Hechtsheimer Str. 2
DE-55131 Mainz
Germany
IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Erich Clementi
Geschäftsführung: Martin Jetter (Vorsitzender), Reinhard Reschke,
Christoph Grandpierre, Matthias Hartmann, Michael Diemer, Martina
Koederitz
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940
Could you use a file of random data? You can create one of those really
easy: dd if=/dev/urandom of=ranfile bs=9999
Sam
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/