PHP speed tests

These pages have a few benchmark tests for PHP4 perfomance to do the same thing using different methods.:


READ LOOP: foreach() vs. while(list()=each())
MODIFY LOOP: foreach() vs. while(list()=each())
For-loop test
Using the &-ref-operator as so called “alias”
$obj = new SomeClass() vs. $obj =& new SomeClass() using the =&-ref-operator
double (“) vs. single (‘) quotes
sSet() vs. empty() vs. is_array()
switch/case vs. if/elseif

Creating int array[100 000]
Reading int array[100 000]
Reading apache log (16Mb)
Parse vars names [100 000]
Parse and find text from apache log (32Mb)
Split text apache log 200Kb (contain 2000 “-“)
Count array size. $arr = int[100 000]
Create object by Ref (loop 100 000)
Random number generator (loop 100 000)
Calculate hash (loop 100 000)

NB Refresh the pages a few times, the results change as webserver load differs.

Viewing the internet

There are a few ways to visualise internet and the traffic on it.

One way is to map it. The BBC has a good article on this.

The following programmes take a starting point and use linking for distance. The amount of links to and from a place is used for size.

I/O/D 4 (the webstalker) is one of my all time favorites, but lacks 3D representation, scaling and movement.

Surf 3D has several different viewing modes, and allows you to move through the map. Unfortunately the interface is a bit cluncky, allthough it gives you loads of options.

Here is a large list of links to mapping projects

The above can lead to complex maps, usually starting from a single point (a URL).
More simply, smaller datasets can be mapped.

3D Traceroute turns a traceroute into a complex grapical representation.


Xtraceroute shows a 3D globe and shows the path of the packets over the globe.

There’s a visual whois programme which alsow plots queries over a 3D globe and shows the information next to it.

Another method is to browse traffic and see what it’s doing.

Swarm shows what other swarmers are doing, with the page with the most traffic in the centre.

Driftnet displays the graphics being surfed on websites (and there is an enhancement which also displays mpeg and audio streams) over the network (install on the router)

Webcollage randomly pulls images from internet and throws them up on the screen.

Then there are more freeform methods of viewing the internet.

Driftnet ver.0 (not to be confused with the driftnet above) starts with a URL and displays in hexadecimal and screenshots, using waves to decide where to go next.

MS Patch destroys Flash interaction

A bit late, but apparently due to some patent issues, MS launched an update on April 11 which breaks Flash object interactivity in IE: you have to click the object before it will do your lovely mouseover type stuff. Well done Eolas, you’ve broken a large segment of Internet. This is yet another example of the ridiculousness of the US patent system and another reason to fight it here in Europe.
The link contains a discussion on the subject and fixes for developers.

Windows System Tools

This site has a large list of programmes to manage your windows processes, memory, cpu etc etc etc.

This is the list of programmes I thought might be usefull:
Sysinternals Process Explorer shows you information about which handles and DLLs processes have opened or loaded

Informer shows the time, processor load, amount of processes and threads and the available memory in a tiny free floating moveable display.

Cyberlat RAM Cleaner frees, optimizes and defrags the systems wasted RAM. It should cause less crashes due to leaky memory.

Statbar shows a skinneable bar across the top of the screen with processor information etc. in it.

Google sucks at mathematics

Google has a calculator built into its search engine. Apart from the basics it can also be used for unit conversions, etc. Usually I’d say that’s very nice and can be handy considering just about everything has a google query form attached to it these days.

However..

What do you think would be the result of

1 - 0.9 - 0.1

?

Depending on the order of evaluation you’d say either 0 or 0.2, right? Well, you’re wrong. It’s -2.77555756 × 10e17. Because Google says so. Try it.
http://www.google.nl/search?q=1+-+0.9+-+0.1

It gets the answer to 1 – (0.9 + 0.1) right, but anything else is off.

1 - (0.9) - (0.1)
(1 - 0.9) - 0.1

etc.

A mountain full of PhDs and what do you get? A variation on pi = 3.

Second Hand software

A UK company – Discount Licencing – has figured out that there are some software licences that are, in fact, transferrable through sale. Currently, they have approached MicroSoft and asked them if they would raise a stink if they went and brokered these second hand licences and MS agreed! Anyway, you have to buy in bulk as they get packages from insolvent companies, but if this works out well, they could have enough supplies to start selling individually at some time!