Skip to content

Commit

Permalink
[][std::unordered_map] Optimize c10::Registry::Create (#6609)
Browse files Browse the repository at this point in the history
Reviewed By: bikramSingh91

Differential Revision: D49355735

fbshipit-source-id: 3d78819b909b83d5985851b601e1ba9747a800b4
  • Loading branch information
Jubin Chheda authored and facebook-github-bot committed Dec 2, 2023
1 parent 525fc01 commit ea01c43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion velox/common/serialization/Registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <glog/logging.h>
#include "folly/Preprocessor.h"
#include "folly/container/F14Map.h"

#include "velox/common/base/Exceptions.h"
#include "velox/core/Metaprogramming.h"
Expand All @@ -47,7 +48,7 @@ template <class KeyType, class FunctionSignature>
class Registry {
public:
using Creator = std::function<FunctionSignature>;
using CreatorMap = std::unordered_map<KeyType, Creator>;
using CreatorMap = folly::F14NodeMap<KeyType, Creator>;

Registry() : Create(creatorMap_) {}

Expand Down

0 comments on commit ea01c43

Please sign in to comment.