MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/bhchlr/reeeeeeeee/eltlhhl/
r/shittyprogramming • u/danogentili • Apr 25 '19
29 comments sorted by
View all comments
Show parent comment
1
puts isn't slower than printf lmao, it does a strlen() and then just writes it directly to stdout, there's not much you could do faster EXCEPT maybe using fwrite and using a constant string length
fwrite
1 u/your_mom_on_drugs Apr 26 '19 I thought it was weird but I trusted him ;_; 1 u/[deleted] Apr 26 '19 Atleast in glibc it just calls strlen and and then does a write syscall
I thought it was weird but I trusted him ;_;
1 u/[deleted] Apr 26 '19 Atleast in glibc it just calls strlen and and then does a write syscall
Atleast in glibc it just calls strlen and and then does a write syscall
View all comments
Show parent comment
1
u/[deleted] Apr 26 '19
puts isn't slower than printf lmao, it does a strlen() and then just writes it directly to stdout, there's not much you could do faster EXCEPT maybe using
fwriteand using a constant string length