Need advice on data structures

  • Follow


I am a newbie in lisp and knowing how fast the data structures like a linked list, dequeue a tree, etc can be in c/c++ I am looking for a tutorial or an advice how to implement efficiently those structures in lisp (having performance in mind).
0
Reply prishvin (1) 9/22/2012 8:31:58 AM

Misha Prishvin <prishvin@gmail.com> writes:

> I am a newbie in lisp and knowing how fast the data structures like a
> linked list, dequeue a tree, etc can be in c/c++ I am looking for a
> tutorial or an advice how to implement efficiently those structures in
> lisp (having performance in mind).

Just like in C++.  An algorithm is an algorithm.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.
0
Reply pjb (7645) 9/22/2012 3:22:05 PM


On Saturday, September 22, 2012 4:31:59 AM UTC-4, Mikheil wrote:
> I am a newbie in lisp and knowing how fast the data structures like a linked list, dequeue a tree, etc can be in c/c++ I am looking for a tutorial or an advice how to implement efficiently those structures in lisp (having performance in mind).

Just Do It. If it is slow, post the code here with a subject saying "Lisp Is Slower Than Molasses" and we'll all rewrite for you to make it just 20% slower than C. Pascal's version will erase your hard drive.

hth, hk
0
Reply kentilton (2964) 9/22/2012 4:53:56 PM

kentilton@gmail.com writes:

> On Saturday, September 22, 2012 4:31:59 AM UTC-4, Mikheil wrote:

>> I am a newbie in lisp and knowing how fast the data structures like a
>> linked list, dequeue a tree, etc can be in c/c++ I am looking for a
>> tutorial or an advice how to implement efficiently those structures
>> in lisp (having performance in mind).
>
> Just Do It. If it is slow, post the code here with a subject saying
> "Lisp Is Slower Than Molasses" and we'll all rewrite for you to make
> it just 20% slower than C. Pascal's version will erase your hard
> drive.
>
> hth, hk

I'm only contributing 27 delete-files over 1452 in quicklisp distributed
libraries:

[pjb@kuiper :0 mclgui]$ find ~/src/public/lisp/ -name \*.lisp -exec grep -i '(delete-file' {} \;|wc -l 
27
[pjb@kuiper :0 mclgui]$ find ~/quicklisp/ -name \*.lisp -exec grep -i '(delete-file' {} \;|wc -l 
1452


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.
0
Reply pjb (7645) 9/22/2012 5:13:23 PM

3 Replies
31 Views

(page loaded in 0.117 seconds)


Reply: