News for hackers. Stuff that matters.
Re:Yes, PHP is faster than C# by withinboredom on Wednesday March 16, 2022 @07:50PM (#30705678)
You can follow the link to the underlying C# library where it is reading it in 4kb chunks as well. PHP doesn’t buffer for you, so if you want to read a file one byte (to your peril) at a time, you can. It’ll be as fast as the async version of the C# implementation, but still slower than reading buffered.
Re:Yes, PHP is faster than C# by alkonaut on Wednesday March 16, 2022 @08:05PM (#30705830)
Both of these programs will make the same I/O calls but the total number of method invocations will differ by a factor 4096 unless I’m mistaken (it’s late). Those are cheap, but not free.