Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
BadFox23316yAlso, unless you're running that code a couple hundred times then the time saving is basically negligible.
-
@MrJimmy be careful with what you learn. If you learn regex now, you might have to use it some day!
-
BadFox23316y@beegC0de perhaps, although maybe not for small systems. I can see the use in a system like the internet where 1 ms is massive but in something like a video conversion, 1ms off the conversion time isn't a lot.
-
BadFox23316y@MrJimmy I see "Mr" and I see female avatar. I think to myself "something doesn't add up". Then, I shrug and move on. It's devRant, we're a different people.
=) -
@BadFox well yeah obviously 1ms off an entire transcode is negligible. He got his code to go 6 times faster which isn't negligible.
-
BadFox23316y@beegC0de yes, I know. It went on a tangent. What I meant is, in that case the difference between a total execution time of 60ms Vs 5ms isn't likely to be noticed unless the program is ran several hundred times.
-
donuts236726yBut isn't regex itself just an algorithm? So just means their implementation of loop is more efficient than yours?
-
@billgates its 1 of 2 things... a seried of more efficient loops... or black magic
-
Crap... I feel I need to invest more time in regex than I have previously had.
+Add to Todo!
Related Rants
Fuck i love regex... managed to replace a series of loops and if statements with regex and cut execution time from 60ms down to 5ms
rant
!rant
regex