Is it just me, or is working with references slow?
I have functions that loop through about 1 lines of text, generating
stats on the content.
When I pass the lines to the function normally, this takes 0.8 seconds.
Passing by reference, or as a reference, both increase the time to 6
seconds.
copies are faster if you don't change the copied data since no copy is
actually done. It is a shallow copy also know as a copy-on-write so you
should just pass a copy in your case, I bet.
-Rasmus
On Mon, 14 Jan 2002, Tino Didriksen wrote:
Is it just me, or is working with references slow?
2 matches
Mail list logo