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
Currently, IsHash() parses, compiles and matches a regular expression each time, which is highly inefficient in terms of CPU and RAM. Instead, it should check the length of str and then iterate over str to check the digits, which will be a lot faster and won't allocate any memory at all.
The text was updated successfully, but these errors were encountered:
govalidator/validator.go
Line 708 in a9d515a
Currently,
IsHash()
parses, compiles and matches a regular expression each time, which is highly inefficient in terms of CPU and RAM. Instead, it should check the length ofstr
and then iterate overstr
to check the digits, which will be a lot faster and won't allocate any memory at all.The text was updated successfully, but these errors were encountered: