ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

prettify `isSet` & `formatName` #86

Closed hamidb80 closed 1 year ago

hamidb80 commented 1 year ago

Hey, it's just a clean up

ba0f3 commented 1 year ago

Thank you, isSet is way more cleaner, but as I benchmarked long time ago, formatName is faster than an extra string concatenation in combine with toLowerAscii

SolitudeSF commented 1 year ago

could just be two character adds.

ba0f3 commented 1 year ago

I can you please do a benchmark with benchy to see which one is faster?

ba0f3 commented 1 year ago

nvm, I did it and thier speed are same.Thank you!

name ............................... min time      avg time    std dv   runs
predefined ......................... 0.001 ms      0.001 ms    ±0.000  x1000
tolower ............................ 0.001 ms      0.001 ms    ±0.000  x1000