DEV Community

Discussion on: In response to "Yes, PHP Is Faster Than C#"

Collapse
 
lito profile image
Lito

And memory usage?

Collapse
 
goaty92 profile image
goaty92

Haven't looked into this. From my experiences, the .NET GC tends to be pretty generous with memory allocation, especially with ServerGC, so C# programs usually have a larger memory footprint than say Go or NodeJS. I don't have enough experience with PHP but it would definitely be interesting to look into.

Collapse
 
jacekandrzejewski profile image
Jacek Andrzejewski

You could use memory_get_peak_usage or memory_get_usage to check how much memory is used in PHP. Just add the first one at the end of script.