c++ - Runing a cpp binary on php could speed up my code? -
i'm php developer cpp developer. wondering: if make cpp binary , run on php. make process run faster?
for example:
i have compare 1,000 array elements , execute process each of them , in cases had run on , on again ( recursively) . yes messup works !.
- yes, might faster. it's hard right (lots of corner cases in ipc).
- don't try unless it's absolutely necessary performance. first try improve algorithm in php.
- don't use c++ code in production until you've measured difference, , c++ solution faster.
- don't run binary, write library , link php interpreter. php implemented in c, export c++ functions c using
extern "c".
Comments
Post a Comment