-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
created optimized versions, added unit tests, new benchmarks #2
base: master
Are you sure you want to change the base?
Conversation
… optimizations Consider using this class only after profiling on your data, works slower with arrays with huge nesting.
put enchance-php(http://enchance-php.com into enchance folder and run unit_test.php
Here are some observations:
Am not sure if this is best practice .. and do you have Thanks for the unit test ... That was very need am always very lady to implement ... |
removed line that was added for testing purposes
Yes I have Enhance php unit testing framework is compact and pretty easy to get started with, and due to the similar api you can easily switch to a much heavier PHPunit in cases when you really need it. |
|
Btw. I prefer |
ZMQ is a transport layer which you can use to implement your own message queue with multiple workers. This not Multithreading and going this route is as good as saving the data
This would be a Broker Model using |
About Multithreading with MQ. I don't think pthread would give much performance gain compared to What do I mean about low-level optimization? Imagine the case when one 3 functions are called 10 000 times, eg total 30 000 times, function call in php takes a while, in production environment(with much higher call numbers) we can use the optimized version of the code to minimize function calls at least 3 times. Lol, why are you mentioning STUPID for a pull request where are no Singletons introduced(I find them not usable too), all code is covered with tests, optimization is made on the top of the working class(I consider that it is Mature optimization in such case), and the Naming is fixed? Yes the class should remain easily readable and modifiable, but not at the performance cost, all additional features can be implemented in other application classes, and as this has been started(and you greatly helped me with, even created the whole thing) as a simple array querying class with MongDB like syntax. The good thing would be to implement all basic MongoDB operators, such as Also I wanted to ask(didn't test it myself yet) is it possible to use |
minor improvements * changed var++ to ++var, as its faster due to the implementation in PHP core
minor improvements * changed var++ to ++var, as its faster due to the implementation in PHP core * removed commented out code
|
Created optimized versions of ArrayQuery class