[Question]New way of packet handling?

01/26/2011 20:57 stealarcher#16
@unknownone Thanks for the clarification on everything.

I typically work with PHP, and in PHP it doesn't effect it too much when u do something as the following:

Code:
$var = "Test";
$Test = "Hello";
$Test2 = " World";
echo ${$var};

Outcome: Hello
Which allows it to be dynamic using the same principle. AKA, im too used to the high-level of programming and am trying to go back to the low-end of things xD
01/26/2011 21:15 unknownone#17
PHP uses a different approach though, usually that of executing code at runtime dynamically, which is of magnitudes slower than optimised code execution to begin with - so you might not notice the difference of slow code vs. slow code.

.NET is compiled and somewhat optimised before execution though. A method call in .NET is pretty much equivalent to a CALL instruction on the processor after JIT compilation. The procedure to invoke a method via reflection involves potentially loading an assembly, looking through metadata for the method, JIT compiling the method, instantiating any objects needed, then calling the method. (pretty costly).

in .NET 4.0, dynamic dispatch is a slight performance improvement over the System.Reflection technique, but is still noticably slower then calling a delegate or method directly.