3 ms·
Within the domain of electronic trading it should be obvious that prices are ordered from best to worst, and that it means increasing order for asks and decreas
by mgaunard 5y ago
Within the domain of electronic trading it should be obvious that prices are ordered from best to worst, and that it means increasing order for asks and decreasing order for bids.
You shouldn't comment on things that are obvious within your domain.
Now you may put a comment if instead you sort things in the reverse order than usual, for example so that you can implement adding/removing a price level at the top more efficiently with std::vector (which is only efficient fot additions/removals at the back).
- masklinn 5y ago> Now you may put a comment if instead you sort things in the reverse order than usual, for example so that you can implement adding/removing a price level at the top more efficiently with std::vector (which is only efficient fot additions/removals at the back). Though in that case you should probably have a comment explaining why you didn't use an std::deque.
- mgaunard 5y agoI'm not sure what such a comment would say? The advantages of vector over deque should be well known to any C++ programmer.
- lordnacho 5y agoIt's more that there's an asymmetry and sometimes that raises a question. You're right I could have picked a better example.