Inline perf fixes from edge
This commit is contained in:
1 parent
1387a8bcf0
commit
c7bd026457
2 files changed
+29
-38
No files matched your search
@@ -61,12 +61,6 @@ void MDProducerHandle::set_key(security_key key) {
|
||||
}
|
||||
}
|
||||
|
||||
security_key MDProducerHandle::key() const {
|
||||
security_key key = has_depth() ? hdepth().key : hdata().key;
|
||||
bts_assert_d(key == cdata().security.key);
|
||||
return key;
|
||||
}
|
||||
|
||||
void MDProducerHandle::set_legs(const std::vector<security_key>& legs) {
|
||||
bts_assert(cdata().security.type == api::SECURITYTYPE_SPREAD);
|
||||
FixedSpreadSecurityL* fss = (FixedSpreadSecurityL*)&cdata().security;
|
||||
@@ -275,32 +269,6 @@ void MDProducerHandle::mark_deleted() {
|
||||
}
|
||||
}
|
||||
|
||||
HotEntry& MDProducerHandle::hdata() const {
|
||||
bts_assert_d(_hdata && !has_depth());
|
||||
return *static_cast<HotEntry*>(_hdata);
|
||||
}
|
||||
|
||||
HotDepthEntry& MDProducerHandle::hdepth() const {
|
||||
bts_assert_d(_hdata && has_depth());
|
||||
return *static_cast<HotDepthEntry*>(_hdata);
|
||||
}
|
||||
|
||||
HotHeader& MDProducerHandle::hheader() const {
|
||||
bts_assert_d(_hheader);
|
||||
return *_hheader;
|
||||
}
|
||||
|
||||
ColdEntry& MDProducerHandle::cdata() const {
|
||||
bts_assert_d(_cdata);
|
||||
return *_cdata;
|
||||
}
|
||||
|
||||
ColdHeader& MDProducerHandle::cheader() const {
|
||||
bts_assert_d(_cheader);
|
||||
return *_cheader;
|
||||
}
|
||||
|
||||
|
||||
}}//namespace
|
||||
|
||||
#endif
|
||||
@@ -27,7 +27,11 @@ public:
|
||||
|
||||
bool has_depth() const { return cheader().has_depth; }
|
||||
void set_key(security_key);
|
||||
security_key key() const;
|
||||
security_key key() const {
|
||||
security_key key = has_depth() ? hdepth().key : hdata().key;
|
||||
bts_assert_d(key == cdata().security.key);
|
||||
return key;
|
||||
}
|
||||
void set_legs(const std::vector<security_key>& legs);
|
||||
|
||||
void update_bid(TimeStamp time, const PriceSize bid, uint32_t depth=0); // hot
|
||||
@@ -66,11 +70,30 @@ private:
|
||||
friend class SecurityIDRecorder;
|
||||
friend struct bts::co2::Work;//fuckingc++
|
||||
|
||||
HotEntry& hdata() const;
|
||||
HotDepthEntry& hdepth() const;
|
||||
HotHeader& hheader() const;
|
||||
ColdEntry& cdata() const;
|
||||
ColdHeader& cheader() const;
|
||||
HotEntry& hdata() const {
|
||||
bts_assert_d(_hdata && !has_depth());
|
||||
return *static_cast<HotEntry*>(_hdata);
|
||||
}
|
||||
|
||||
HotDepthEntry& hdepth() const {
|
||||
bts_assert_d(_hdata && has_depth());
|
||||
return *static_cast<HotDepthEntry*>(_hdata);
|
||||
}
|
||||
|
||||
HotHeader& hheader() const {
|
||||
bts_assert_d(_hheader);
|
||||
return *_hheader;
|
||||
}
|
||||
|
||||
ColdEntry& cdata() const {
|
||||
bts_assert_d(_cdata);
|
||||
return *_cdata;
|
||||
}
|
||||
|
||||
ColdHeader& cheader() const {
|
||||
bts_assert_d(_cheader);
|
||||
return *_cheader;
|
||||
}
|
||||
|
||||
// COPY OK -- BTS_NO_COPY(MDConsumerHandle);
|
||||
void* _hdata;
|
||||
|
||||
Reference in new issue
Block a user