guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uniform vectors, user survey


From: Roland Orre
Subject: Re: Uniform vectors, user survey
Date: Tue, 26 Oct 2004 05:03:07 +0200

I'm mainly using guile for data analysis (basically everything
what I'm doing) and I'm always used uniform vectors a lot.

I'm using uniform vectors as basic data structures and as interfaces.
The types I'm using are mainly:
#s()        Float
#i()        Double
#h()        Short
#u()        Integer
#t          bits

As my habit is to implement things in scheme first and then go to
C-code I can gain incredible effects on performance compared to
e.g. using standard vectors, which I'm basically use for high
level data structures, to keep other vectors and things in.
With uniform vector gc goes to zero and the C-code becomes
very efficient.

I like the uniform vectors and consider them to be an essential
feature of guile. I've used them since guile started to be guile
ten years or so ago. I also use the shared vectors (as well as
shared substrings, nowadays priv impl.) for efficieny reasons.

I have to agree somewhat with Peter Christopher though, that
I'm not entirely enthusiastic about the prototypes, even though
they are quite intuitive (it's basically the difference between
float vectors and double vectors I'm not very fond of, as well
as the reading/printing syntax of uniform vectors maybe should
be more consistent. It may preferrably be something like:

type    print/read      proto
gen     #()             '()     or 'v
float   #f()            'f
double  #d()            'd
complex #c()            'c
signint #i()            'i
uns.int #u()            'u
short   #s()            's
llong   #l()            'l
bit     #*1010          '*
string  #a()            'a

and so on, something like this would be more intuitive I think,
but this is just a wild suggestion.

        Best regards
        Roland Orre






reply via email to

[Prev in Thread] Current Thread [Next in Thread]