View Single Post
Old 10-19-2020, 01:56 AM  
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
Quote:
Originally Posted by CyberSEO View Post
Only 3 lines of code. We call it optimization, bro
While I will admit - short, elegant, you are firing up the regex engine. I actually timed the execution for shits to see which works fastest (adding an echo of the output at the end for fairness in each):

0.0002028942108 (konrad v1)
0.0002288818359 (konrad v2)
0.0003898143768 (cyberseo)
0.0011749267578 (sarettah)

We are of course talking about 1/10000ths of a second difference here
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote