You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EndsInNumber parses the number, but does not use the result of it. Just using the validations, without the parsing, would make ipv4 parsing 28% faster.
Activity
debadree25 commentedon Jan 16, 2023
So basically instead of
int64_t num = ParseIPv4Number(last_str, last_str + last.size());we would just use a validator here?anonrig commentedon Jan 16, 2023
There are 2 optimizations can be done here.
debadree25 commentedon Jan 16, 2023
Understood! Thanks! will attempt this!
src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid
miguelteixeiraa commentedon Jan 16, 2023
I'm really sorry @debadree25 ! : ((
I was already working on it and should have commented something here.
I apologize for that
debadree25 commentedon Jan 17, 2023
No issue at all checking out your PR to learn!!
src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid
src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid
src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid
src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid