refactor: add comments
This commit is contained in:
parent
405bb21a9a
commit
3f2375dd85
|
@ -2462,7 +2462,7 @@ KVstore::binarySearch(unsigned _key, const unsigned* _list, unsigned _list_len,
|
|||
long long _mid;
|
||||
while (_left <= _right) {
|
||||
_mid = (_right - _left) / 2 + _left;
|
||||
cout<<"check "<<_step<<" "<<_mid<<" "<<_step*_mid<<" "<<_list_len<<endl;
|
||||
//cout<<"check "<<_step<<" "<<_mid<<" "<<_step*_mid<<" "<<_list_len<<endl;
|
||||
if (_key == _list[_step * _mid]) {
|
||||
return _mid;
|
||||
}
|
||||
|
|
2
NOTES.md
2
NOTES.md
|
@ -619,6 +619,8 @@ http://www.hprd.org/download/
|
|||
|
||||
|
||||
## GIT USAGE
|
||||
|
||||
http://www.ruanyifeng.com/blog/2014/06/git_remote.html
|
||||
https://git-scm.com/book/zh/v1/%E8%B5%B7%E6%AD%A5-%E5%88%9D%E6%AC%A1%E8%BF%90%E8%A1%8C-Git-%E5%89%8D%E7%9A%84%E9%85%8D%E7%BD%AE
|
||||
|
||||
#### how to commit a message
|
||||
|
|
|
@ -35,6 +35,9 @@ class VList
|
|||
{
|
||||
public:
|
||||
//NOTICE:the border is 10^6, but the block is larger, 1M
|
||||
//this is not choosed intuitively, we make sure that using vlist is better: transferring time>random seek time(x/40M>0.006)
|
||||
//Also notice that if no modification on data, read a node is almost sequentially in normal IVTree
|
||||
//In VList, case is the same and using VList may bring another seek cost!(it is not easy to setup cache for IVTree due to data struct)
|
||||
static const unsigned LENGTH_BORDER = 1000000;
|
||||
//static const unsigned LENGTH_BORDER = 100;
|
||||
static const unsigned BLOCK_SIZE = 1 << 20; //fixed size of disk-block
|
||||
|
|
Loading…
Reference in New Issue