comp.lang.ada
 help / color / mirror / Atom feed
From: bartc <bc@freeuk.com>
Subject: Re: Why does Ada compile slower than Python?
Date: Tue, 3 Oct 2017 14:07:01 +0100
Date: 2017-10-03T14:07:01+01:00	[thread overview]
Message-ID: <PXLAB.1004251$gM6.409757@fx03.am4> (raw)
In-Reply-To: <oqugga$1j1c$1@gioia.aioe.org>

On 03/10/2017 00:01, 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.

What sizes of programs are we talking about here? In terms of numbers of 
lines of code. And how long to you have to wait in each case.

Languages like Python can have a swift byte-code compiler which puts the 
code into memory and then it can start execution immediately, doing any 
dynamic linking on-demand as it runs. But even here, a big program may 
cause noticeable start-up delays.

A static language like Ada may depend on a slow, cumbersome compiler 
like gcc (I think that's how Gnat works; I've never used it), and then 
there is a build process to create an executable. The process may also 
depend on configuration scripts and makefiles. It may have to deal with 
library info (like header files in C) which may dominate the size of 
your application.

Such languages are not really designed for rapid turn-around.

Ada is also rather more complicated, although I'm not sure how much of a 
factor that is.

(I write small compilers for simple languages. My byte-code compilers 
can work at up to 1Mlps (one million lines of code per second). My 
static compilers can generate native code at 0.5Mpls.

So there needn't be a big gulf between the two kinds of languages. It's 
just that mainstream tools tend to be big and slow. While my compilers 
do little optimisation, the difference between mine and something like 
gcc can be well within a factor of two in generated code speed. But my 
compiler can do its job 100 times faster.)

-- 
bartc


  parent reply	other threads:[~2017-10-03 13:07 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 [this message]
2017-10-03 13:41   ` G.B.
2017-10-03 21:08 ` Victor Porton
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