in reply to Advanced Data Structure Question

"anything I prototype in Perl will ultimately be ported to C"
Perl and C arrays are quite a bit different. Algorithms like this written for Perl will not necessarily perform well in other languages. This applies particularly to C and performance.
You might find it quicker to write in C in the first place, otherwise you might find yourself writing Perl array handling in C, again.

Replies are listed 'Best First'.
Re^2: Advanced Data Structure Question
by Limbic~Region (Chancellor) on Apr 19, 2006 at 14:19 UTC
    cdarke,
    I am confused - how does skipping a Perl prototype avoid duplicating Perl array handling in C? Perl's arrays are really efficient at doing certain operations and those are the same operations I am going to need to do in C if I decide to use an array as my datastructure. The point of the Perl prototype is so that I can actually see what I need to do. Besides, there is more to the project than just this data structure.

    Cheers - L~R

      My point is that you can't do the same thing with C arrays as with Perl arrays. Of course Perl is written in C so anything you can do in Perl can be done in C, except there may be a more efficent way of handling things in C.
        cdarke,
        Ok - I can buy that. So your advice then is to choose an Array as my datastructure and to spend my research time on figuring out how to do what I want in C efficiently. This is valid and is actually the way I am leaning.

        Just another C neophyte,
        L~R