0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-08 14:34:53 -05:00
bitcoin-core/src
Akio Nakamura e46be25f0e Reduce redundant code of prevector and speed it up
In prevector.h, the code which like item_ptr(size()) apears in the loop.
Both item_ptr() and size() judge whether values are held directly or
indirectly, but in most cases it is sufficient to make that judgement
once outside the loop.

This PR adds 2 private function fill() which has the loop to initialize
by specified value (or iterator of the other prevector's element),
but don't call item_ptr() in their loop.
Other functions(assign(), constructor, operator=(), insert())
that has similar loop, call fill() instead of original loop.

Also, resize() was changed like fill(), but it calls the default
constructor for that element each time.
2018-02-27 11:42:33 -08:00
..
bench Add new prevector benchmarks. 2018-02-27 11:42:06 -08:00
compat
config
consensus
crypto
leveldb Bump leveldb subtree 2018-02-16 08:59:28 -05:00
obj
obj-test
policy fee estimator: avoid sorting mempool on shutdown 2018-01-25 18:02:24 -05:00
primitives Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
qt Merge #12287: Optimise lock behaviour for GuessVerificationProgress() 2018-02-25 09:13:43 +08:00
rpc Merge #12083: Improve getchaintxstats test coverage 2018-02-26 16:51:20 +01:00
script Fix a-vs-an typos 2018-02-11 10:48:15 +01:00
secp256k1
support
test Merge #12477: test: Plug memory leaks and stack-use-after-scope 2018-02-23 17:17:07 +01:00
univalue univalue: Bump subtree 2018-02-10 09:55:54 -05:00
wallet Merge #12287: Optimise lock behaviour for GuessVerificationProgress() 2018-02-25 09:13:43 +08:00
zmq
.clang-format
addrdb.cpp
addrdb.h
addrman.cpp Merge #11577: Fix warnings (-Wsign-compare) when building with DEBUG_ADDRMAN 2018-01-29 14:26:26 +01:00
addrman.h Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
amount.h
arith_uint256.cpp
arith_uint256.h
base58.cpp
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge #12050: [trivial] Implements a virtual destructor on the BaseRequestHandler class. 2018-02-06 18:05:34 +01:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Properly alphabetize output of CLI --help option. 2018-02-01 23:19:41 -08:00
bitcoind-res.rc
bitcoind.cpp Move scheduler/threadGroup into common-init instead of per-app 2018-01-25 11:35:34 -05:00
blockencodings.cpp
blockencodings.h
bloom.cpp
bloom.h
chain.cpp
chain.h
chainparams.cpp Fix typos 2018-01-28 13:21:25 +01:00
chainparams.h Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding 2018-01-24 13:07:05 +01:00
chainparamsbase.cpp Refactor: One CBaseChainParams should be enough 2018-02-08 22:06:43 +01:00
chainparamsbase.h Refactor: One CBaseChainParams should be enough 2018-02-08 22:06:43 +01:00
chainparamsseeds.h Fix a-vs-an typos 2018-02-11 10:48:15 +01:00
checkpoints.cpp
checkpoints.h
checkqueue.h [Refactor] Remove unused fQuit var from checkqueue.h 2018-01-07 20:44:21 +00:00
clientversion.cpp Merge #11966: clientversion: Use full commit hash for commit-based version descriptions 2018-02-13 10:58:41 +01:00
clientversion.h
coins.cpp
coins.h
compat.h Add new prevector benchmarks. 2018-02-27 11:42:06 -08:00
compressor.cpp
compressor.h
core_io.h
core_memusage.h
core_read.cpp Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
core_write.cpp
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
fs.cpp
fs.h
hash.cpp
hash.h
httprpc.cpp Use the character based overload for std::string::find. 2018-01-11 21:40:51 +01:00
httprpc.h
httpserver.cpp Merge #12366: http: Join worker threads before deleting work queue 2018-02-08 09:21:49 +01:00
httpserver.h
indirectmap.h
init.cpp init: Remove translation for -blockmaxsize option help 2018-02-20 10:48:38 +01:00
init.h Move scheduler/threadGroup into common-init instead of per-app 2018-01-25 11:35:34 -05:00
key.cpp Use ptrdiff_t type to more precisely indicate usage and avoid compiler warnings. 2018-02-05 02:25:28 -08:00
key.h Make CKey::Load references const 2018-01-23 13:16:56 -05:00
keystore.cpp Merge #11403: SegWit wallet support 2018-01-10 20:55:41 -10:00
keystore.h Merge #11403: SegWit wallet support 2018-01-10 20:55:41 -10:00
limitedmap.h
Makefile.am Split signrawtransaction into wallet and non-wallet 2018-02-17 11:42:00 -05:00
Makefile.bench.include Add new prevector benchmarks. 2018-02-27 11:42:06 -08:00
Makefile.leveldb.include
Makefile.qt.include
Makefile.qttest.include
Makefile.test.include
memusage.h
merkleblock.cpp
merkleblock.h
miner.cpp Use mempool's ancestor sort in transaction selection 2018-01-13 15:57:30 -05:00
miner.h Use mempool's ancestor sort in transaction selection 2018-01-13 15:57:30 -05:00
net.cpp boost: remove useless threadGroup parameter from Discover 2018-02-08 14:35:28 -05:00
net.h boost: remove useless threadGroup parameter from Discover 2018-02-08 14:35:28 -05:00
net_processing.cpp Fix ignoring tx data requests when fPauseSend is set on a peer 2018-02-08 18:06:21 -05:00
net_processing.h net: Move misbehaving logging to net logging category 2018-01-24 12:18:29 +01:00
netaddress.cpp Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
netaddress.h
netbase.cpp Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
netbase.h
netmessagemaker.h
noui.cpp
noui.h
pow.cpp
pow.h
prevector.h Reduce redundant code of prevector and speed it up 2018-02-27 11:42:33 -08:00
protocol.cpp
protocol.h Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
pubkey.cpp
pubkey.h
random.cpp
random.h
rest.cpp scripted-diff: Use UniValue.pushKV instead of push_back(Pair()) 2018-02-10 10:05:07 -05:00
reverse_iterator.h
reverselock.h
scheduler.cpp
scheduler.h
serialize.h
streams.h Fix typos 2018-01-28 13:21:25 +01:00
sync.cpp Fix typos 2018-01-28 13:21:25 +01:00
sync.h
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp boost: drop boost threads from torcontrol 2018-02-08 14:35:29 -05:00
torcontrol.h boost: drop boost threads from torcontrol 2018-02-08 14:35:29 -05:00
txdb.cpp
txdb.h Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
txmempool.cpp Remove unused mempool index 2018-01-09 08:59:21 -05:00
txmempool.h Avoid leaking prioritization information when relaying transactions 2018-01-25 18:02:24 -05:00
ui_interface.cpp
ui_interface.h
uint256.cpp
uint256.h
undo.h
util.cpp test: Add unit test for LockDirectory 2018-02-15 16:25:13 +01:00
util.h test: Add unit test for LockDirectory 2018-02-15 16:25:13 +01:00
utilmoneystr.cpp
utilmoneystr.h
utilstrencodings.cpp
utilstrencodings.h
utiltime.cpp
utiltime.h
validation.cpp Merge #12287: Optimise lock behaviour for GuessVerificationProgress() 2018-02-25 09:13:43 +08:00
validation.h
validationinterface.cpp
validationinterface.h
version.h
versionbits.cpp
versionbits.h
warnings.cpp
warnings.h