passing sequences to procedures/functions

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

i obviously don't know all the internal workings of the euphoria
compiler but it occured to me that passing big sequences to procedures and
functions must be an awful waste of memory...  because an entire sequence
can be passed to a subprogram intact and any changes to it inside the
subprogram don't affect the sequence externally, i figure that it must
make a complete copy of that sequence when it is passed...  however, if you
had like a billion element sequence, then it would have to make another
billion element sequence when you passed it to a procedure or
something, right??  in many cases, however, you wouldn't alter the sequence, jus
t
read from it, or you wouldn't mind altering the external form...  so
wouldn't it be possible to pass a sequence to a procedure or function via
pointer, so that the sequence used internally by the procedure/function
and externally are one and the same...  this would prevent having to
make a duplicate of the sequence by making just a duplicate of the pointer
to that sequence...  i dunno just thinking :>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu