Help for this page

Select Code to Download


  1. or download this
    perl -wle 'system("ps uch $$");@x=1..1_000_000;print "Elements in \@x:
    + " . @x;; system("ps uch $$");'
    xxx      2395  0.0  1.0  46488 44384 pts/0    R+   18:46   0:00 perl
    Elements in @x: 1000000
    xxx      2395  0.0  1.5  66104 64012 pts/0    R+   18:46   0:00 perl
    
  2. or download this
    perl -wle 'system("ps uch $$");push @x, $i while ($i++ < 1_000_000);pr
    +int "Elements in \@x: " . @x;; system("ps uch $$");'
    xxx      2365  0.0  0.0   3152  1248 pts/0    R+   18:45   0:00 perl
    Elements in @x: 1000000
    xxx      2365 20.0  0.5  22992 21056 pts/0    R+   18:45   0:00 perl
    
  3. or download this
    perl -wlce 'system("ps uch $$");@x=1..1_000_000;print "Elements in \@x
    +: " . @x;; system("ps uch $$");CHECK { system("ps uch $$"); }'
    xxx      2554  0.0  1.0  46488 44404 pts/0    R+   18:50   0:00 perl
    -e syntax OK
    
  4. or download this
    perl -wlce 'system("ps uch $$");push @x, $i while ($i++ < 1_000_000);p
    +rint "Elements in \@x: " . @x;; system("ps uch $$");CHECK { system("p
    +s uch $$") }'
    xxx      2521  0.0  0.0   3152  1260 pts/0    R+   18:49   0:00 perl
    -e syntax OK