Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-04

Re: size/speed/compiler - Was:another fpc RAD: MSEide

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

L505

Okay so we have to now consider these points:
1. interpreted languages can take up less memory if engineered right (says Florian)
2. compilation and linking is a hassle - compared to shipping or uploading an interpreted file
3. speed - not a big deal. Hardware cheap enough.
4. size - shipping an interpreted file usually smaller than exe/elf
5. uploading - uploading a 30K script file on a 56k modem is easier than uploading a 5MB binary

What advantage of compilation? There must be something.

I know Microsoft use to love compiling those EXE's because you couldn't see the source code to the EXE's.
Is this the advantage of FPC? That we can hide our sources?

:-)

Florian Klaempfl
to L505
L505 wrote 10 lines
Okay so we have to now consider these points: 1. interpreted languages can take up less memory if engineered right (says Florian) 2. compilation and linking is a hassle - compared to shipping or uploading an interpreted file 3. speed - not a big deal. Hardware cheap enough. 4. size - shipping an interpreted file usually smaller than exe/elf 5. uploading - uploading a 30K script file on a 56k modem is easier than uploading a 5MB binary What advantage of compilation? There must be something.

2. is true but: with a interpreted language your user has the hazzle to get proper libraries for the interpreter, get the interpreter itself etc. while with a compiler the developer who should know his tools has hazzle.

3. isn't true for real interpreted languages, they are really slow, we aren't talking about JIT like Java or .NET but things like Python, Perl, PHP they are magnitudes slower than compiled languages. Don't take the advantages of the Python (small memory footprint) and Java (JIT, i.e. not that slow) and say a compiled program is bad because it is a) not much faster than java and b) takes more memory than Python :) You overlook then that a compiled program usually takes a) less memory than a jrt and b) is magnitudes faster than Python.

4.+5. is also only partly true. What shall I do with a 30K script if I miss the interpreter and runtime environment with 10-20 MB?

Show quoted text 12 lines
I know Microsoft use to love compiling those EXE's because you couldn't see the source code to the EXE's. Is this the advantage of FPC? That we can hide our sources? :-) _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Michael Van Canneyt
to L505: Okay so we have to now consider these points: 1. interpreted languages can take up less…
L505 wrote
Okay so we have to now consider these points: 1. interpreted languages can take up less memory if engineered right (says Florian)

So can compiled. It depends all on your RTL.

I used such languages.

The interpreted languages Florian talks about had less functionality for you than the system unit of FPC offers. You could basically add strings and numbers, and write them to file. That's it.

2. compilation and linking is a hassle - compared to shipping or uploading an interpreted file

And an interpreter, don't forget.

3. speed - not a big deal. Hardware cheap enough.

Speed definitely does matter for some apps: application servers, database servers etc. So you can't generalize this.

4. size - shipping an interpreted file usually smaller than exe/elf

Not if you count the interpreter. Granted, you must download that only once. This advantage can be had with compiled languages if you have a packages system.

5. uploading - uploading a 30K script file on a 56k modem is easier than uploading a 5MB binary

Not if you count the interpreter. Try installing Python, perl or PHP, plus all of the 'packages' you need.

What advantage of compilation? There must be something.

You know your code is syntactically correct. With interpreted, you don't.

Michael.

Jeff Miller
to Michael Van Canneyt
> 3. speed - not a big deal. Hardware cheap enough. Speed definitely does matter for some apps: application servers, database servers etc. So you can't generalize this.

I'll have to agree with the second comment, not the first.

I use fpc for statistical simulation programs, many of which run for 6 weeks or more (with different pieces of the simulation running in parallel on 6-8 different PCs). From my experience with interpreted systems, these projects would take _years_ on the even fastest of those.

fpc is a great tool--much appreciated!

Jeff

���� ����������� � mail.ru
to L505: Okay so we have to now consider these points: 1. interpreted languages can take up less…

L> 3. speed - not a big deal. Hardware cheap enough. If you ship programs, it's not you who decide whether hardware is cheap.

If you do a small repetitive task several millions times, speed may easily differ hundred times (for example: compiled piece of code fits into cache, but interpreted doesn't; multiply by misc inefficiencies inside cycle).

Uncommon data processing may easily require such repetitive tasks.

If all tasks were common, program development would suffer much.

L505
to Michael Van Canneyt: So can compiled. It depends all on your RTL. I used such languages. The interpreted…
> 3. speed - not a big deal. Hardware cheap enough. Speed definitely does matter for some apps: application servers, database servers etc. So you can't generalize this.

This is my view too.. purely playing devils advocate there.. :-)

Show quoted text 7 lines
> 4. size - shipping an interpreted file usually smaller than exe/elf Not if you count the interpreter. Granted, you must download that only once. This advantage can be had with compiled languages if you have a packages system. > 5. uploading - uploading a 30K script file on a 56k modem is easier than uploading a

5MB

Show quoted text 9 lines
> binary Not if you count the interpreter. Try installing Python, perl or PHP, plus all of the 'packages' you need. > > What advantage of compilation? There must be something. You know your code is syntactically correct. With interpreted, you don't.

I wonder why they haven't invented a pre-compiler that checks your script for you first.. well I think Zend IDE might do something like this.. but I've never tried Zend as I don't do that much PHP programming lately.

Michael Van Canneyt
to Jeff Miller: I'll have to agree with the second comment, not the first. I use fpc for statistical…
Jeff Miller wrote 13 lines
>> 3. speed - not a big deal. Hardware cheap enough. > > Speed definitely does matter for some apps: application servers, > database servers etc. So you can't generalize this. I'll have to agree with the second comment, not the first. I use fpc for statistical simulation programs, many of which run for 6 weeks or more (with different pieces of the simulation running in parallel on 6-8 different PCs). From my experience with interpreted systems, these projects would take _years_ on the even fastest of those.

Agreed.

Try DNA sequencing with an interpreted system. You'd probably need a time which must be expressed using cosmic scales, something like the age of the universe ;)

Michael.