comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada vs SQLite3 benchmark
Date: Thu, 18 Sep 2014 22:08:50 +0200
Date: 2014-09-18T22:08:50+02:00	[thread overview]
Message-ID: <vul1sfxxgjcb.1dkwamti6g6gd$.dlg@40tude.net> (raw)
In-Reply-To: 815a16a3-2393-4045-9e0a-3bb28123d26a@googlegroups.com

On Thu, 18 Sep 2014 01:08:46 -0700 (PDT), briot.emmanuel@gmail.com wrote:

> Why did you run the benchmarks without optimization ? That seems
> inconsistent. If you are measuring performance, you should run with full
> optimization on I think.

Optimization could remove or rearrange parts of code which would not happen
in a real-life case. For example doing something like

   for I in 1..1000 loop
      N := I;
   end loop;

could be optimized to N := 1000.

IMO, not optimized code is a better measure for algorithmic complexity.
 
> Also, it would be interesting to use the following pragmas (combined or
> not) in sqlite, since they can impact performance significantly:
>      pragma journal_mode=WAL;
>      pragma synchronous=OFF;    (unless the Ada code is also running fsync() regularly)
>
> I think the latter in particular will significantly change the time measured for sqlite.

Thanks for pointing this.

Regarding Ada, it was strictly Ada.Direct_IO, nothing else. Ada.Direct_IO
does not have Flush [*]. As far as I can tell GNAT's implementation of
Ada.Direct_IO.Write is fwrite not followed by fsync. So forcing SQLite to
sync might be unfair. However, the intended use surely must sync upon
commit.

-----------
* Maybe it is worth an AI to add Flush to Direct_IO.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-09-18 20:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 16:51 Ada vs SQLite3 benchmark Dmitry A. Kazakov
2014-09-17 23:26 ` gdotone
2014-09-18  0:16 ` Jeffrey Carter
2014-09-18  7:31   ` Dmitry A. Kazakov
2014-09-18  5:50 ` Georg Bauhaus
2014-09-18  7:27   ` Dmitry A. Kazakov
2014-09-18  7:56     ` Georg Bauhaus
2014-09-18  8:05       ` Dmitry A. Kazakov
2014-09-18  8:08       ` briot.emmanuel
2014-09-18 20:08         ` Dmitry A. Kazakov [this message]
2014-09-18  8:17 ` Marius Amado-Alves
2014-09-18 13:41 ` Jacob Sparre Andersen
2014-09-18 19:42   ` Dmitry A. Kazakov
2014-09-18 17:09 ` Pascal Obry
2014-09-22 15:43   ` Gour
2014-09-22 16:08     ` Pascal Obry
2014-09-22 17:00       ` Gour
2014-09-22 16:29     ` Dmitry A. Kazakov
2014-09-22 17:02       ` Gour
2014-09-22 19:09         ` Dmitry A. Kazakov
2014-09-22 20:19           ` Gour
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox