|
Re: Earthquake Research Update � April 13, 2011 |
How big are your arrays? How many dimensions? What data type are the contents? Perhaps you can give me a rough example? As an example from my POV, let's say we're talking about earthquake event data. This consists of date/time and location. Specifically: year, month, day, hour, minute, seconds (in 100th's), latitude, longitude, depth. That's a total of 9 fields. Even if we assume everything is stored as a 32-bit floating point number (not efficient), that's still only 36 bytes total for one event. [32-bits = four 8-bit bytes times 9 fields = 4*9 = 36] Now say we have 100,000 events. That's still only 3.6 million bytes of data. In my programs I store one event in only 20 bytes - one double precision (4 bytes) for the date/time represented in Julian date, and three single precision (2 bytes) for the lat, long, and depth. This is all represented by four single dimension arrays, such as Date[x], Lat[x], Long[x], and Depth[x]. Of course, I have complete control of the size of the data types whereas I believe in Perl you don't. I can define a variable as any one of 16 different types, and can make custom types as well. Roger could be right in that your choice of PERL is not a good one for this kind of task. I've dabbled in PERL, but only as a cgi script to dynamically generate web content with very few calculations. But even so, it did not strike me as a very good 'calculator'. It's also possible that there's a better way to perform the task. Even though I've been programming as a hobby since the early 80's, I'm still learning new tricks all the time. Brian Follow Ups: ● Re: Earthquake Research Update � April 13, 2011 - Roger Hunter 18:23:43 - 4/13/2011 (78618) (1) ● Re: Earthquake Research Update � April 13, 2011 - Skywise 20:11:42 - 4/13/2011 (78621) (0) |
|