mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-02 17:06:00 +00:00
Use unordered map for handling book_offers:
The performance characteristics of `std::unordered_map` are better than `std::map` and the former should be preferred when the strict ordering of the latter is not required.
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
@@ -4023,7 +4024,7 @@ NetworkOPsImp::getBookPage(
|
||||
Json::Value& jvOffers =
|
||||
(jvResult[jss::offers] = Json::Value(Json::arrayValue));
|
||||
|
||||
std::map<AccountID, STAmount> umBalance;
|
||||
std::unordered_map<AccountID, STAmount> umBalance;
|
||||
const uint256 uBookBase = getBookBase(book);
|
||||
const uint256 uBookEnd = getQualityNext(uBookBase);
|
||||
uint256 uTipIndex = uBookBase;
|
||||
|
||||
Reference in New Issue
Block a user