BinaryByter
So much time lost where I could implement trees
Anonymous
Anonymous
i want to see where exactly it uses it
Anonymous
because last i checked printf only calls another printf function using VA format
Ludovic 'Archivist'
i want to see where exactly it uses it
to call write syscall with the size
BinaryByter
printf uses strlen? show me this
using strlen produces code that is more readable and also it's more secure
Kelvin
Googled my name?
me pro, i hack ps2
Zero
me pro, i hack ps2
Wtf lol😂😂
Anonymous
and the last one calls write syscall
fair enough however output to files should also be minimized
Anonymous
that is the most expensive operation
Kelvin
Wtf lol😂😂
yes, me pro, i hack ps2, no cd
Anonymous
Isnt that what std::string encurages you to do/does?
yes however i do not have an extra 16 bytes of useless functions
BinaryByter
?
#noendl
Marie
?
https://m.youtube.com/watch?v=6WeEMlmrfOI https://m.youtube.com/watch?v=GMqQOEZYVJQ
Ludovic 'Archivist'
Anonymous
the bytes are not functions
what are they for then?
Ludovic 'Archivist'
yes however i do not have an extra 16 bytes of useless functions
You have no idea how C++ internal work, go back studying and hella stfu
Anonymous
i did not look too in detail
Kelvin
endl, buffer is flushed, so its slow /n is fast
Anonymous
but it is extra shit i do not need
Ludovic 'Archivist'
what are they for then?
Size, capacity, pointer, 8bytes for SSO
BinaryByter
\n *
even if you want to flush, don't use endl
Kelvin
yes however i do not have an extra 16 bytes of useless functions
16bytes? are you working with limited memory?
Ludovic 'Archivist'
SSO?
small string optimization
BinaryByter
16bytes? are you working with limited memory?
he thinks that memory is more important than speed and security
Ludovic 'Archivist'
allows to store 16 bytes of string without further allocation
BinaryByter
which is bollocks
BinaryByter
allows to store 16 bytes of string without further allocation
8 bytes for SSO => 16 bytes you can store without allocation?
Ludovic 'Archivist'
BinaryByter
I see
Anonymous
allows to store 16 bytes of string without further allocation
however you can start by having buffer sizes of things you want and actually map it out this way it is in the stack
Anonymous
stack is faster then heap
Ludovic 'Archivist'
stack is faster then heap
and for that you can use std::array<char,n> =eventually
Ludovic 'Archivist'
stack is faster then heap
and btw, this is not true when you pass arguments placed on stack
Ludovic 'Archivist'
which is not what std::string does
and for a reason, it is not the same
Ludovic 'Archivist'
string is made to me modifiad, elongated, and manipulated, array has a fixed length
Ludovic 'Archivist'
depends on some things
try to create a 4096 buffer in the stack and pass that buffer in functions recursively
MᏫᎻᎯᎷᎷᎬᎠ
Read books
BinaryByter
#goodgoogling
Marie
https://support.google.com/websearch/answer/134479?hl=en
Ludovic 'Archivist'
Go in the Univerty of Aarhus in denmark lol
MᏫᎻᎯᎷᎷᎬᎠ
Nice
Ludovic 'Archivist'
worked fine
and how much stack space did it took xD
Anonymous
because i passed a pointer to it
Ludovic 'Archivist'
8 bytes each time
Then you never passed the buffer but a pointer to it
olli
@ollirz time for you to tell me why C is fine on embedded systems 😉
C is fine in general - ASIL rated compilers C++ compilers are not available for every platform
Anonymous
no need to be fancy
Anonymous
do it the smart way
Ludovic 'Archivist'
which is all you need
not for protecting your structure against hazardous modifications
Anonymous
for recursive calls the size of the array will be decreasing as well
Ludovic 'Archivist'
btw, passing a reference to a string is just as cheap ;)
Ludovic 'Archivist'
so is passing an iterator recursively
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
btw, passing a reference to a string is just as cheap ;)
yes however this is just the same as passing a pointer to that object
Anonymous
just syntax sugar so it looks nicer
Ludovic 'Archivist'
also, stack itself is not faster than heap
Ludovic 'Archivist'
stack allocation is
MᏫᎻᎯᎷᎷᎬᎠ
Legends are talking
Anonymous
stack allocation is
more expensive but accessing
Ludovic 'Archivist'
so this argument is false
you can always const a reference
Anonymous
you can always const a reference
you can always const a pointer
MᏫᎻᎯᎷᎷᎬᎠ
Legends are talking
I better shut the hell up