Would it be simply better to use the system's functions rather than use the language?

Posted by Nullw0rm on Stack Overflow See other posts from Stack Overflow or by Nullw0rm
Published on 2010-05-10T09:17:38Z Indexed on 2010/05/10 9:24 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

There are many scenarios where I've questioned PHP's performance with some of its functions, and whether I should build a complex class to handle specific things using its seemingly slow tools.

For example, Complex regular expressions with sed and processing with awk would seemingly be exponential in performance rather than making PHP's regular expression and seemingly excessive functions parse and in time manage to finish it. If I were to do a lot of network tasks such as MX lookups/DIGging/retrieving simultaneously I would rather pass it via system() and let the OS handle it itself. There are simply too many functions in PHP, that are inefficient and result in slow pages or can be handled easier by the OS.

What are your opinions?

Do you think I should do the hard work with the OS in its own/custom functions?

© Stack Overflow or respective owner

Related posts about linux

Related posts about os