From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!news.etla.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada vs SQLite3 benchmark Date: Thu, 18 Sep 2014 09:31:09 +0200 Organization: cbb software GmbH Message-ID: <1dqhz2v8srsn5.3yatqlo05shu.dlg@40tude.net> References: <10k8o95prdhuj$.195flbmen5kex.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: yj8+JIQUMOEawvIM7K49kA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:189039 Date: 2014-09-18T09:31:09+02:00 List-Id: On Wed, 17 Sep 2014 17:16:35 -0700, Jeffrey Carter wrote: > On 09/17/2014 09:51 AM, Dmitry A. Kazakov wrote: >> I posted benchmark of Ada persistent B-tree vs. SQLite3 at Ada Programming >> blog: >> >> http://ada-programming.blogspot.de/2014/09 >> >> The implementation of B-tree is based on Ada.Direct_IO with a transaction >> layer, e.g. for safety against system failure. > > Is your B-tree/Direct_IO version task safe? Yes. It uses a persistent memory pool on top of the file. The pool has a protected object implementing a mutex and tree operations run with the mutex taken. > Is your version of SQLite compiled > to be thread safe? Should be as the SQLite DB is opened with the FULL_MUTEX option. The documentation is somehow fuzzy about the effects of FULL_MUTEX, but I suppose it should make it task-safe. As far as I can tell the most time-consuming part of SQLite operations was commit. Immutable operations are way quicker. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de