I thought VB.NET should be a lot faster than PHP because

1. PHP is a scripting language and everytime it is run, it need to be compile and thus take longer time. Although .NET is not fully compile (like Java), but I think it should be faster than PHP.

2. PHP is weakly type, which mean a variable is equilvalent to the 'object' variable in .NET where it can store anything without the need to define it/declare it to a specific type. So it should run slower then .NET because a lot of casting (i.e. checking variable type) is being perform.

BUT ...

I used to use PHP to read my raw log files and generate stats. Now I am trying the same with VB.NET. The log is around 100MB In both programming language,

1. I read the log line by line
2. Split each line into different parts
3. And write a new file that meet my requirements (the shrinked log file)

RESULT ...

PHP completed the job in around 10 seconds.
VB.NET take 30 seconds.

-------------
I can't believe this and I continue with part 2 of my work. I generate stats from my *shrinked* version of log file.
------------

RESULTS...

PHP takes merely 2 seconds.
VB.NET take around 20 seconds.

DISCUSSION...

I believe the reason of .NET is slower because it utilise a lot of Objects, everything is Objects, string is objects, integer it objects, datetime is objects ... and objects are slow. And when dealing with hundred of thousands of objects (the log contains 160,000 lines), the time taken is noticeable.

CONCLUSION ...

Object Oriented Programming make programming easy but the the trade-off is TIME. It can't even challenge PHP directly stye programming.

The reason I post this is to hear from opinions. Please voice it out loud!