lorien lorien tmp cat test php for 30000 for 3000 echo use strict use

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
lorien@lorien /tmp $ cat test.p*
<?php
$x = 0;
for ($i=0; $i < 30000; $i++) {
$x = $x - 1;
for ($j = 0; $j < 3000; $j++) {
$x = $x +1;
}
}
echo 'x = [' .$x. ']' . "\n";
?>
use strict;
use Spreadsheet::ParseExcel;
my $file = 'Price_BTG.xls';
my $excel = Spreadsheet::ParseExcel::Workbook->Parse($file);
foreach my $sheet (@{$excel->{Worksheet}}) {
printf("Sheet: %s\n", $sheet->{Name});
$sheet->{MaxRow} ||= $sheet->{MinRow};
foreach my $row ($sheet->{MinRow} .. $sheet->{MaxRow}) {
$sheet->{MaxCol} ||= $sheet->{MinCol};
foreach my $col ($sheet->{MinCol} .. $sheet->{MaxCol}) {
my $cell = $sheet->{Cells}[$row][$col];
if ($cell) {
printf("( %s , %s ) => %s\n", $row, $col, $cell->{Val});
}
}
}
}
x = 0
for i in xrange(3000):
x -= 1
for j in xrange(3000):
x += 1
print x