Preallocate all possible PortVals.

The performance benefit is small (maybe ~1% at most), however, it's a
trivial change without downsides.
This commit is contained in:
Jon Siwek 2017-12-11 15:29:28 -06:00
parent 895e7b06b1
commit 1e4964de77
29 changed files with 139 additions and 68 deletions

View file

@ -703,7 +703,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
break;
case TYPE_PORT:
pval = new PortVal(*kp);
pval = port_mgr->Get(*kp);
break;
default: