Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TeeJay (2309)

TeeJay
  (email not shown publicly)
http://www.aarontrevena.co.uk/

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm : london.pm, bath.pm, devoncornwall.pm
lug : Devon & Cornwall LUG
CPAN : TEEJAY [cpan.org]
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl [livejournal.com]
flickr :hashbangperl [flickr.com]

Journal of TeeJay (2309)

Saturday April 12, 2003
01:14 PM

Iterator class in 'quite slow' shoclker

[ #11616 ]
I have been playing around with a nice iterator object (for use in TT templates) and it seems impossible to make more than half the speed of copying an array of arrays into an array hashrefs.

This is using perl 5.6.1 so Object calls in Perl 5.8 may be faster but not much.

Anyway the iterator is very easy to use, and means I can change underlying data structures and the iterator just works.

This means my current web project (a resteraunt and entertainment search engine) uses two patterns - SQL Phrasebook and Iterators. I wonder how many more I can get in.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I have been playing around with a nice iterator object (for use in TT templates)

    If you are only using these iterator objects within TT, take a look at Template::Iterator -- every FOREACH and FOR loop within a template is already implemented using an Iterator (that's the loop special variable). This iterator class is trivially modifiable to work outside of TT, as well, if you want to go that way.

    --
    (darren)