You could drop the chomp as you don't need it, your regex doesn't care about the line ending. As BrowserUk points out doing anything millions of times adds up, so it might reduce your runtime a little.
Also, as you don't use the first value, you might be able to write your regex as just /\t(\d+)/ , assuming that your file is completely regular and doesn't have any odd lines or comments in it ;)
In reply to Re: Faster push and shift
by RichardK
in thread Faster push and shift
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |