Hi,

On Sun, Jun 29, 2014 at 1:19 PM, dmccunney <dennis.mccun...@gmail.com> wrote:
>
> There are fundamental language differences to take into account.
>
> Niklaus Wirth created Pascal as a teaching tool, for teaching
> algorithm design.  It was originally intended to be "compiled" on
> paper, with the teacher grading the quality of the student's
> assignment.  In ISO standard Pascal, the last I knew, things like I/O
> were undefined, because a program wouldn't *do* I/O.  When compiler
> writers began creating compilers to generate executables from Pascal
> code, they had to roll their own in areas like I/O, because it wasn't
> defined in the language.  Pascal spread widely be4cause it was
> relatively easy to learn to write, but became inherently non-portable
> because of differences in implementations.

I think you're mistaking it for ALGOL 60. Because Pascal always had
I/O built-in to the language (and compiler). That part was always
there, even before ISO got involved.

> The earliest C compiler used in Unix "compiled" the C language
> statements into Assembler, and then called as, the system assembler,
> to generate the object code from the Assembler, and ld, the link
> editor, to put the parts together into an executable the user could
> run. It was possible to interrupt the compilation before as was
> called, and hand optimize the Assembler code before continuing. It was
> rather later that C compilers became sophisticated enough to comple
> directly to object code.

Some compilers are faster (on certain OSes) if you don't shell out to
run the assembler for every file. But it makes cross-compilation much
harder.

> Those early DEC minis had a 32K address space, so C had to be compiled
> in a low resource environment.  But generating the *smallest*
> executable wasn't the main goal.  There is always a tradeoff between
> speed and code size.  The fastest possible code is in line, but the
> more code that is in line, the larger the object file will be.  To
> make code small, you isolate code that will be executed multiple times
> as a function, and you call the function, but calling the function has
> overhead and your code isn't as fast.

But the problem we're seeing here is dead code that is never called
but still linked in. It's not just code that is rarely used, actually
stuff that is completely useless. But most compilers can't tell the
difference, smartlinkers aren't that common, and libraries aren't
often hand-optimized.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to