Hacker News new | past | comments | ask | show | jobs | submit login

The reason for picking it is for memory safety as well as performance. If your problem involves a lot of regex and memory safety isn't as critical, then feel free to pick a language with good regular expression libraries. If regular expressions are a smaller part of your problem you're solving, looking at overall performance is better than benchmarks like this.



I'd never know that if this post didn't exist, so I don't think the investigation is silly at all.


Your conclusion is correct, but the reason I take issue is that that’s not the thesis of OP. OP’s original subject/headline suggests that, or questions why, Rust is generally slow vs PHP, and uses a regex example as the “proof”. A person who didn’t read the Reddit comments, or who is less versed in critical thinking, may accept the example as a valid proof of the thesis, instead of simply noting the fact that Rust may not be as good at regex as it is at other things. If the Reddit subject was “Rust is worse than PHP at regex”, nobody would bat an eyelid and the resulting conversational threads would have a different tenor (and your conclusion would and should be the same).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: