Here's an i386 optimised version of strlen() from Solaris:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/i386/gen/strlen.s
Haven't benchmarked it but looking at the code it's obvious that it won't give anything like the 10000x speed improvement you mentioned - more...
I do have to reboot for playing games :) But for everything else Vmware is perfect for me. I have been dual booting since the time i started using fbsd (4.8 i think) but for me rebooting is not a practical option anymore. Besides, it's not just Windows i also have Solaris installed to try out...
I use Linux as my primary desktop OS (due to non-availability of some apps.). If you are running a desktop env. there is practically no difference b/w Linux & BSD. Most of the apps. are available for both Linux and BSD and they look & work the same way.
But every time I open a terminal window...
Memory is made up of bytes and is numbered from 0 to whatever amount you have available on your m/c.
strlen() is called with str pointing to the string (say) "hello" already stored in memory starting at address (say) 756, like shown below:
---------------------------
... |h |e |l |l |o...
I think the problem is that srand() is being called for every call to rand(). When srand(3) is initialized with the same value the psuedo random number sequence is repeated (awk's srand() is probably implemented as srand(time(0)).).
Try: awk 'BEGIN {srand()} {print rand()}'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.