3 ms·
How is that better than just checking against a list of suburb names?
by wodenokoto 3y ago
How is that better than just checking against a list of suburb names?
- _0ffh 3y agoThe regex is a compressed representation which saves memory, and it's also likely to be quite a bit faster which saves cycles. I consider it a clever bit of optimisation.
- singingfish 3y agoIt's also handling what state the suburb is in, and can deal with various kinds of bad data (e.g. lack of uniformity of spacing and capitalisation).