Re: Efficiency of arrays in LISP




Actually I had a similar more newbie - ish question relating to
SBCL/CMUCL: when passing small tuples (vectors, matrices for 3d and 2d
around) a lot - which is more efficent, small arrays, a struct or
multiple-values?

My guess was multiple values for the 2-3-4 tuples (they live in
registors or on the stack, don't they?) and small arrays of single
floats for the 9-16 tuples (matrices)..

I guess I should DISSASEMBLE and find out, rather than be lazy and ask
the group. Although the group might know of implementation gotchas that
I don't

On Oct 30, 3:22 am, "robinganemcca...@xxxxxxxxx"
<robinganemcca...@xxxxxxxxx> wrote:
I have a list of data that I'm going to need to remove elements from,
and select elements from randomly. I am wondering the array functions
in common lisp would be more effective (in terms of execution time)
then using remove to remove and creating a loop that takes the car if
iterations has reached the random number, and recursively calls itself
on the cdr with a greater value of iterations otherwise. Coding
complexity is not an issue.

Thanks in advance.

.



Relevant Pages

  • Re: why cannot assign to function call
    ... and passing the array by reference? ... void mysub (int k, int n) { ... say C was definitely pass-by-reference (for arrays)? ... If one could only use v as a pointer (i.e. access ...
    (comp.lang.python)
  • Re: Difference between passing a number and a variable to a subroutine
    ... This results in code that is consistent with the standard, which is silent on specifying argument passing mechanisms, so it should result in code that is as portable as possible. ... has to pass a lot of large arrays to its subroutines. ... alter them and some do alter them. ...
    (comp.lang.fortran)
  • Re: passing array to function to pick up values
    ... passing around arrays. ... > Hi Birgit, ... > Dim bRes As Boolean ...
    (microsoft.public.word.vba.general)
  • Re: passing char arrays by reference
    ... Et voila - not just one, but two arrays being passed by value. ... Yes, yes, very good - except that what you're really passing by ... are being passed as much by value as the struct itself. ... I, your host for tonight's annual Mental Inflexibility Awards 2008, am in ...
    (comp.lang.c)
  • Re: C# and VB.Net?
    ... >> And the latter group typically don't adopt OO-principles. ... >> can't undestand why passing a huge array to a method would be the bad ... Arrays are reference types - you're not passing a ...
    (microsoft.public.dotnet.languages.csharp)