Hi, From: http://stackoverflow.com/a/27589146/23567
Here is how I choose which data structure to use in Racket: DATA STRUCTURE ACCESS NUMBER INDICES List: sequential Variable not used Struct: random Fixed names Vector: random Fixed integer Growable vector: random Variable integer Hash: random Variable hashable Splay: random Variable non-integer, total order 2015-08-02 16:56 GMT+02:00 mazert <[email protected]>: > Le 02/08/2015 13:04, Jens Axel Søgaard a écrit : > >> Hi, >> >> For programs that need to use "vectors whose length can change" >> grow vectors are often the right choice: >> >> http://docs.racket-lang.org/data/gvector.html >> > > Ok, I didn't know about this data structure, and effectively you are right > : the performance are better. I tested with a simple program computing time > to remove the first element from a gvector and a vector, both contains > 1000000 elements : > > gvector : 7 ms > vector : 102 ms > > So that was a very bad idea, thank you for letting me know :) > > > -- > You received this message because you are subscribed to the Google Groups > "Racket Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-dev/mplb3k%24rvi%241%40ger.gmane.org > . > > For more options, visit https://groups.google.com/d/optout. > -- -- Jens Axel Søgaard -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CABefVgwYKT4kAWt8ET42t2G5weFntCSooLr8K07QvZBh5MSfeA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
