Little River Software
Home -> Articles -> String Vs Array
Little River Software - Custom PHP Software Design and Programming
The ASP to PHP Comparison

Conclusion

The Windows to Linux Comparison

PHP On Windows Results (Repeated)

ItemCountString LengthString TimeArray TimeBenefit %
180009729260.6630.530125.02%
2000010847260.8030.625128.52%
2200011965260.9740.720135.25%
2400013083261.2090.933129.58%
2600014201261.4421.060136.06%
2800015319261.6771.202139.46%
3000016437261.9521.339145.77%
3200017555262.2571.525148.03%
3400018673262.5511.697150.33%
3600019791262.8651.856154.38%
3800020909263.2722.070158.06%
4000022027263.5952.273158.17%

PHP On Linux Results

ItemCountString LengthString TimeArray TimeBenefit %
180009729260.1140.29938.02%
2000010847260.1240.32638.01%
2200011965260.1380.36238.18%
2400013083260.1500.39737.85%
2600014201260.1620.42937.80%
2800015319260.1770.46038.57%
3000016437260.1900.49238.70%
3200017555260.2030.52838.42%
3400018673260.2150.57837.12%
3600019791260.2260.60237.51%
3800020909260.2460.64638.04%
4000022027260.2550.67937.56%
5000027617260.3130.85636.60%
6000033207260.3761.03536.28%
7000038797260.4521.22736.81%
7200039915260.4661.26436.91%
7400041033260.4601.33234.51%
7600042151260.4581.36433.59%

Now that came as a surprise.

Firstly there was no advantage to breaking up a long string on Linux, The overhead of array handling made the process slower not faster. Perhaps some of the string handling problems derive from Windows rather than from ASP or VB.

Comparing PHP on Linux to PHP on Windows.

Perhaps not so surprising, but...

The tests were run on the same machine, but booting off different (although of identical make and model) removable drives. The processing times on Linux were much much faster than on Windows. This might have been expected, except that Linux had a few disadvantages. The Linux installation (from RH8) had almost every package that comes with RH8 installed. In other words the Linux machine had considerable extra overheads, and absolutely no tuning. The Zend optimiser is installed on Windows but not on Linux. The Windows machine has relatively few 'extras' running, and has the Zend Optimizer and yet its still slower.

The ASP to PHP Comparison

Conclusion