[Coldstuff] .join() vrs. join()
Adam Cormany
coldstuff@cold.org
Mon, 5 Aug 2002 11:12:08 -0700 (PDT)
Is there a time when I should be using .join() instead
of join() or is this just the users preference? On my
system at least, join() seems a bit faster than
.join():
[06:07 PM:/home/s/soth] ;["a", "b"].join();
=> "a b"
[ seconds: 0.000023; operations: 6 ]
[06:08 PM:/home/s/soth] ;join(["a", "b"]);
=> "a b"
[ seconds: 0.000007; operations: 6 ]
The same goes for explode() and .explode():
[06:08 PM:/home/s/soth] ;"a b".explode();
=> ["a", "b"]
[ seconds: 0.000028; operations: 3 ]
[06:10 PM:/home/s/soth] ;explode("a b");
=> ["a", "b"]
[ seconds: 0.000012; operations: 3 ]
Just curious.
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com