question

new topic     » goto parent     » topic index » view thread      » older message » newer message

I have a question for how interpreter does its internal things.

Example:

function f ()
	return {1, "large data"}
end function

procedure main ()
	sequence tmp
	sequence data
	tmp = f ()
	data = tmp [2]
	data = append (data, "something")
	-- If I assume correct previous line had to make
	-- a copy fo "large data", which would slow things down,
	-- and there are now two copies of "large data",
	-- one in 'tmp' and one (modified) in 'data'.
	--
	-- Would it be better and faster if after line
	-- data = tmp [2]
	-- I would do this:
	-- tmp = {}?
end procedure



new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu