Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Fast data structure..!!!

by moklevat (Priest)
on Apr 15, 2008 at 15:54 UTC ( [id://680548]=note: print w/replies, xml ) Need Help??


in reply to Fast data structure..!!!

Depending on the type of data you are working with, you might benefit from using PDL. For numerical tasks I have found that it can be very fast and memory efficient.

Update: As requested below, let's say you want a 2D array. You can create a "piddle" (the PDL data structure) with a sequence of arbitraty length and two dimensions as simply as:

#!/usr/bin/perl use strict; use warnings; use PDL; my $sequence = pdl [0..20],[0..20]; print "$sequence\n"; ***Outputs*** [ [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] ]

Replies are listed 'Best First'.
Re^2: Fast data structure..!!!
by MimisIVI (Acolyte) on Apr 15, 2008 at 16:19 UTC
    Hi moklevat,

    I dont know anything about PDL..

    Can you give a simple example how can use the numerical task with the PDL??

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://680548]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-03-19 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found