http://qs1969.pair.com?node_id=564706

There are many absolutely brilliant Perl programmers. Some of them will give you not only an answer to your question, but also tell you exactly what's happening in memory on your specific version of your operating system when you run that code... But did you ever just want an answer to your question?

If someone has a small problem in a production environment, the solution is rarely "Re-write the entire program, convert your data, go in as root and install DBMS xyz, use module def, and retrain all of the users, and you might have better performance."