Answer the question
In order to leave comments, you need to log in
Will HipHop PHP pay off?
Good afternoon. I am writing a tester for trading, and it just so happened that the main (and for the backend, just the only) language for me is PHP. In general, the moment has come when it takes more than one day to check, which is why the question arose of speeding up this process. I need a performance increase of about 15-20x, although, of course, the more the better) From the article , I saw that HipHop speeds up work by about 17 times, but, as I understand it, the guys from facebook refused to compile and did not go to the virtual machine ? Need advice from those who have worked with HipHop or with a virtual machine. Will this give me the desired increase or should I think about rewriting the application for pluses? Regarding the tester: most of the code is cycles, you need to run a lot of bars (prices) to match the pattern.
I don’t know C, so I’ll have to study it, and if the advice is in rewriting, then if possible, throw a textbook under Visual 2013 Express. I tried several tutorials, but after copying the example, the compiler gave an error. Apparently, different development environments have their own characteristics, and I am 0 in this regard.
Answer the question
In order to leave comments, you need to log in
Telepath on mode:
If you are writing a tester , then most likely your bottleneck is not the code of the tests themselves at all - but their number multiplied by the duration (which also depends on the response time of the system under test).
Accordingly, you need to think not about linear acceleration of work, but about parallel execution of tests.
For example, here is a general story about the harsh decision of Badoo habrahabr.ru/company/badoo/blog/220211 , you have a simpler task.
Yes, it does not speed up anything by 17 times, if you have a slow shitty code, then just profile it and optimize slow places and increase the speed by 15 times.
Don't think that I'm kidding. Maybe you just need to change the paradigm already. Take your algorithms and rewrite them in python - everything will be faster.
It all depends on how your code is written. If there are calls to global variables, magic methods are used, etc. then JIT it will be very bad to optimize everything.
In general, it's easier to run your tool through HHVM and see what happens. But the increase, if any, is not 20 times, but 2-5 times maximum. But again, you need to check. Just install hhvm (there are packages for the main distributions) and run the test.
In general, I have suspicions that in php you can speed up everything at times by reviewing the application architecture. In particular - parallelization, it will obviously work faster in several threads if there are no data dependencies between tests. Well, etc.
On the project I'm working on, the performance gain is close to zero. Symphony 2.
As far as I understand you, we are talking about the need to quickly calculate millions of options per unit of time in order to select the optimal strategy. You will most likely need C and OpenCL/CUDA. Such tasks, as the experience of various traders in this area has shown, fit well with the architecture of video chips. Get ten times faster.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question