Re:Yes, PHP is faster than C#
by Mindless2112 on Wednesday March 16, 2022 @07:54PM
(#30705723)
Syscalls are not the only consumer of wall clock time, which is what was measured.
> To read in binary, you open with 'rb' and not just 'r'.
No. "The default translation mode is 'b'." [1] And even in 't' mode, it's still reading bytes in PHP vs UCS-2 characters in C#.
but it makes function calls, it's not neglectable as it's called as many time as the bytes the file has
Re:Yes, PHP is faster than C#
by withinboredom on Wednesday March 16, 2022 @07:58PM
(#30705766)
That’s the api provided, and part of the point. The other option is to read the buffer directly, but it isn’t exposed to the programmer.
the overload is right below it
int StreamReader.Read()
int StreamReader.Read(char[] buffer, int index, int count)
https://github.com/dotnet/runtime/blob/1ba0394d71a4ea6bee7f6...
To read in binary, you open with 'rb' and not just 'r'