Closed ThisAccountHasBeenSuspended closed 3 months ago
My first PR with my new account on GitHub. Older PR from me: https://github.com/igorlira/dirplayer-rs/pull/5 https://github.com/igorlira/dirplayer-rs/pull/7 https://github.com/igorlira/dirplayer-rs/pull/8
The delimiter should only have a single char.
char
This avoids unnecessary calls from the processor and saves memory space (a String has a size of 24 bytes while a simple char has a size of 1 byte).
String
if delimiter == "\r" { }
lea rdi, [rsp + 16] lea rsi, [rip + .L__unnamed_13] call qword ptr [rip + core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq::h5252a21b9e880e82@GOTPCREL] test al, 1 jne .LBB30_2
if delimiter == '\r' { }
cmp al, 13 je .LBB31_2
My first PR with my new account on GitHub. Older PR from me: https://github.com/igorlira/dirplayer-rs/pull/5 https://github.com/igorlira/dirplayer-rs/pull/7 https://github.com/igorlira/dirplayer-rs/pull/8
The delimiter should only have a single
char
.This avoids unnecessary calls from the processor and saves memory space (a
String
has a size of 24 bytes while a simplechar
has a size of 1 byte).Compare
String
'sif delimiter == "\r" { }
Compare
char
'sif delimiter == '\r' { }