Feng Zhu 8f09d53fd1 remove malloc when create data and index iterator in Get
Summary:
  Define Block::Iter to be an independent class to be used by block_based_table_reader
  When creating data and index iterator, update an existing iterator rather than new one
  Thus malloc and free could be reduced

Benchmark,
Base:
commit 76286ee67ef4b89579a92134b996a681c36a1331
commands:
--db=/dev/shm/rocksdb --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --write_buffer_size=134217728 --max_write_buffer_number=2 --target_file_size_base=33554432 --max_bytes_for_level_base=1073741824 --verify_checksum=false --max_background_compactions=4 --use_plain_table=0 --memtablerep=prefix_hash --open_files=-1 --mmap_read=1 --mmap_write=0 --bloom_bits=10 --bloom_locality=1 --memtable_bloom_bits=500000 --compression_type=lz4 --num=2621440 --use_hash_search=1 --block_size=1024 --block_restart_interval=1 --use_existing_db=1 --threads=1 --benchmarks=readrandom —disable_auto_compactions=1

malloc: 3.30% -> 1.42%
free: 3.59%->1.61%

Test Plan:
  make all check
  run db_stress
  valgrind ./db_test ./table_test

Reviewers: ljin, yhchiang, dhruba, igor, sdong

Reviewed By: sdong

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D20655
2014-07-30 16:34:35 -07:00
..
2014-05-15 14:09:03 -07:00
2014-05-15 14:09:03 -07:00
2014-06-19 01:37:21 -07:00
2014-05-15 14:09:03 -07:00
2014-05-07 17:48:31 -07:00
2014-05-01 14:09:32 -04:00
2014-04-09 21:17:14 -07:00
2014-07-21 10:31:33 -07:00
2014-07-21 10:31:33 -07:00
2014-07-21 10:31:33 -07:00
2014-02-03 00:30:43 -08:00
2014-07-18 00:08:38 -07:00
2014-06-20 10:23:02 +02:00
2014-07-18 00:08:38 -07:00