unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Uniform vectors, user survey
@ 2004-10-22 14:19 Marius Vollmer
  2004-10-23 14:02 ` Neil Jerram
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Marius Vollmer @ 2004-10-22 14:19 UTC (permalink / raw)


Hi,

I want to unify our two implementations of uniform vectors, and make
them more useful.

We do have (srfi srfi-4), which implements uniform vectors according
to SRFI-4, and we have the 'old' uniform vectors that are created with
'make-uniform-vector'.

I guess uniform vectors would be mainly useful for interfacing to
external code that deals with large arrays.  Like the GNU Scientific
Library, say, or maybe things like data compression, image
manipulation, binary file formats in general, etc.

Instead of using uniform vectors, one can always define a new smob
type that can wrap the large external array.  But maybe uniform
vectors would be preferable in some cases, if only you could convince
Guile to handle the external memory right (like you can with smobs).

I have close to zero experience with using uniform vectors myself, so
I appreciate your input.  Do you use uniform vectors?  What for?  Did
you try but couldn't make them work for you?  What do you wish would
be different about them?  Etc.

Thanks!


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Uniform vectors, user survey
@ 2004-10-26  3:03 Roland Orre
  0 siblings, 0 replies; 11+ messages in thread
From: Roland Orre @ 2004-10-26  3:03 UTC (permalink / raw)


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




_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-11-05 17:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 14:19 Uniform vectors, user survey Marius Vollmer
2004-10-23 14:02 ` Neil Jerram
2004-10-24 16:04 ` Mikael Djurfeldt
2004-10-25 18:08 ` Stephen Compall
2004-10-25 18:34   ` Peter Christopher
2004-10-25 19:51     ` Ludovic Courtès
2004-10-25 22:00 ` Mike Gran
2004-10-26  2:50 ` Steve Tell
2004-11-04 17:48 ` Marius Vollmer
2004-11-05 17:01   ` Marius Vollmer
  -- strict thread matches above, loose matches on Subject: below --
2004-10-26  3:03 Roland Orre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).