comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Re: Why does Ada compile slower than Python?
Date: Wed, 04 Oct 2017 00:08:57 +0300
Date: 2017-10-04T00:08:57+03:00	[thread overview]
Message-ID: <or0u97$1hot$1@gioia.aioe.org> (raw)
In-Reply-To: oqugga$1j1c$1@gioia.aioe.org

Victor Porton wrote:

> Why does Ada compile much slower than Python, even in absence of
> optimization?
> 
> We can usually get a Python source files and immediately run it.
> 
> But with Ada we would need to wait a considerable amount of time till it
> compiles.
> 
> Why?

Hm,

$ time gnatgcc -c test.adb 

real	0m0.068s
user	0m0.064s
sys	0m0.000s
$ time python3 test.py
XXX


real	0m0.040s
user	0m0.032s
sys	0m0.004s


-- test.adb
with Ada.Text_IO; use Ada.Text_IO;

procedure Test is
begin
   Put_Line("XXX");
end;


# test.py
print("XXX\n");


$ gnatgcc --version
gnatgcc (Debian 7.2.0-8) 7.2.0

According this test (valid only for very short programs) compiling Ada is 
slower only two times.

Maybe I was under a wrong impression, because I got this impression when I 
compiled tens of Ada files in a row and my brain was focused on total 
compilation time rather than compilation time for one file?

Is GNAT really much slower than Python? or was it a false impression?

This issue is quite practical: I am going to build a server which will 
execute (in a secure sandbox) XML converters downloaded from the Web written 
in different interpreted languages. By "interpreted" I mean "compiling 
quickly". Can we agree to count Ada as an interpreted language in this 
sense?

-- 
Victor Porton - http://portonvictor.org

  parent reply	other threads:[~2017-10-03 21:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 23:01 Why does Ada compile slower than Python? Victor Porton
2017-10-03  0:05 ` Leff Ivanov
2017-10-03  1:11 ` gautier_niouzes
2017-10-03 11:31   ` Brian Drummond
2017-10-03 20:14   ` Randy Brukardt
2017-10-03 21:23     ` gautier_niouzes
2017-10-03 13:07 ` bartc
2017-10-03 13:41   ` G.B.
2017-10-03 21:08 ` Victor Porton [this message]
2017-10-04 15:00   ` Simon Wright
2017-10-18  5:56   ` olivermkellogg
2017-10-18  6:38     ` Paul Rubin
2017-10-18  7:13       ` Dmitry A. Kazakov
2017-10-18  7:34         ` Björn Lundin
2017-10-18  8:02           ` Dmitry A. Kazakov
2017-10-20  6:25             ` gautier_niouzes
2017-10-04  0:21 ` Mace Ayres
2017-10-04  1:51   ` Andrew Shvets
2017-10-04  1:54 ` Andrew Shvets
2017-10-04 15:47 ` gautier_niouzes
2017-10-04 16:03   ` Victor Porton
2017-10-07 11:47     ` Blady
replies disabled

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