ntdb: inline oob check
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 15 Jun 2012 03:26:40 +0000 (12:56 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 15 Jun 2012 03:26:40 +0000 (12:56 +0930)
commitfdb0b1513af453cf1fc62146155a0bdac21214a7
treed0276ea4f44a999c36c70b5e9a17e2bd17652983
parent6646a4d2bc9344d2f6cdf851a3b95cb3d25baa51
ntdb: inline oob check

The simple "is it in range" check can be inline; complex cases can be
handed through to the normal or transaction handler.

NTDB speed:
Adding 10000 records: 4111-9983(9149) ns (815528 bytes)
Finding 10000 records: 1667-4464(3810) ns (815528 bytes)
Missing 10000 records: 1511-3992(3546) ns (815528 bytes)
Traversing 10000 records: 1698-4254(3724) ns (815528 bytes)
Deleting 10000 records: 3608-7998(7358) ns (815528 bytes)
Re-adding 10000 records: 3259-8504(7805) ns (815528 bytes)
Appending 10000 records: 5393-13579(12356) ns (1274312 bytes)
Churning 10000 records: 6966-17813(16136) ns (1274312 bytes)
NTDB speed in transaction:
Adding 10000 records: 916-2230(2004) ns (815528 bytes)
Finding 10000 records: 330-866(770) ns (815528 bytes)
Missing 10000 records: 196-520(471) ns (815528 bytes)
Traversing 10000 records: 356-879(800) ns (815528 bytes)
Deleting 10000 records: 505-1267(1108) ns (815528 bytes)
Re-adding 10000 records: 658-1681(1477) ns (815528 bytes)
Appending 10000 records: 1088-2827(2498) ns (1274312 bytes)
Churning 10000 records: 1636-4267(3785) ns (1274312 bytes)
smbtorture results:
ntdb speed 85588-189430(157110) ops/sec
lib/ntdb/check.c
lib/ntdb/free.c
lib/ntdb/io.c
lib/ntdb/open.c
lib/ntdb/private.h
lib/ntdb/transaction.c