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

Re: Any thoughs on Iterator prefetching?

by pKai (Priest)
on Jun 25, 2009 at 13:42 UTC ( #774717=note: print w/replies, xml ) Need Help??


in reply to Any thoughs on Iterator prefetching?

A wise man once said: "Prediction is hard, especially about the future."

A look into the source of Iterator shows, that it is implemented as you described (one value look ahead internally).

Doing it this way seems questionable.


Update: It seems that he needs the look ahead to be able to return undef as a valid value telling it apart from Iterator-exhausted.

So maybe you are better of with Iterator::Simple which cannot yield undef, but will also not look ahead.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://774717]
help
Chatterbox?
[LanX]: the last
Discipulus yes a very bad day
[shmem]: grandola, vila morena
[shmem]: LanX: ah, that one. You'll get the bug reports also :P
[Discipulus]: upvote me! i'll make pm great again! ;=)
[shmem]: Discipulus reminds me of an irish saying: "I would guess a tomorrow can wait 'til this day is done" :-)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-04-29 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.