Can command line utilities run faster than C ++?

I have a project where I want to manipulate certain output files.

This can be done using a combination of grep and sed and piping with |

Alternatively, I can also write a C ++ program to do the same.

Is there a definitive answer about which method will be faster since grep and sed should already be well optimized enough?

+5
source share
4 answers

++, , , , ( ) , , , IPC, .

, 24/7 , , .

...

+7

, , , , . , , .

+4

, , grep sed ( , ). , ( ), , , .

0
source

Most likely, if you are a very good C / C ++ programmer and spend a lot of time, you can write a program that is faster than the pipeline you are thinking about. But if performance is so critical in this case that you absolutely must do it, you should use the pipeline.

0
source

All Articles