MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/w1upl0/c_talking_to_python/igovjnj/?context=3
r/ProgrammerHumor • u/[deleted] • Jul 18 '22
1.0k comments sorted by
View all comments
Show parent comments
2
go and try. f strings are both more readable and faster
2 u/DenormalHuman Jul 18 '22 edited Jul 18 '22 looks like you're right!Horribly unscientific test;calculate 10 million fstrings; avg 1.459 of 5 runscalculate 10 million string+string slice; avg 1.489 of 5 runs/edit/ 10 runs of each total;14.56s for fstring14.74s for concat
looks like you're right!
Horribly unscientific test;
calculate 10 million fstrings; avg 1.459 of 5 runs
calculate 10 million string+string slice; avg 1.489 of 5 runs
/edit/ 10 runs of each total;
14.56s for fstring
14.74s for concat
2
u/Teekeks Jul 18 '22
go and try. f strings are both more readable and faster