CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Is there something faster than push(@array,'string')?



Aug 30, 2016, 6:56 AM

Post #1 of 2 (2897 views)
Is there something faster than push(@array,'string')? Can't Post

I'm trying to make certain parts of my program run faster. Is there something faster than this?


  1. I just need to put the 'string' anywhere into the array, the order does not matter and the array does not get sorted.
  2. Assume the data has to go into an array, not another data structure.

Also, is there a website with hints on how to make Perl faster?

Thank you.

(This post was edited by bulrush on Aug 30, 2016, 7:17 AM)

Veteran / Moderator

Aug 30, 2016, 9:18 AM

Post #2 of 2 (2894 views)
Re: [bulrush] Is there something faster than push(@array,'string')? [In reply to] Can't Post

Trying to do optimization on random bits of code without know if that code needs more optimization is always the wrong thing to do and a waste of time.

Profile your code before you optimize so that you can learn which parts of your code need additional optimization.

Devel::NYTProf - Powerful fast feature-rich Perl source code profiler

(This post was edited by FishMonger on Aug 30, 2016, 9:19 AM)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives