
Pascal is faster than C++ - lonk
https://medium.com/@srcstorm/pascal-independent-language-for-2017-a5a25f7c62d8
======
jcelerier
That's extremely convincing arguments:

> C++ programs have the potential of running 5–10% faster than Pascal
> programs. However, in practice Pascal programs usually run faster. This is
> because human factor will inevitably involve in real world situations.
> Consider this experiment:

> Pick a simple task and have 2 different individuals work on this task
> separately. Limit their times to 10 minutes. One will code in Pascal, the
> other in C++.

> * Pascal programmer will implement the task in 1 minute. S/he will spend
> remaining 9 minutes to optimize the code.

> * C++ programmer will implement the task in 10 minutes. No time left for
> optimization, hence the program will run poorly.

I will be honest : if I only had this blog post as a source of information on
Pascal and C++, I would almost certainly choose C++ because the lack of proper
arguments certainly means that you are actually unable to put some figures
forward and are just trying to bullshit your reader while deep down you know
that your comparison does not hold.

~~~
Retra
I will be honest: just because someone doesn't have data to back up what they
say doesn't mean they believe the complete opposite "deep down." It probably
just means they're lazy and wishful thinking. What are your qualifications as
a psychiatrist anyway?

------
ncmncm
"You just keep telling yourself that..."

I'll be over here. The greater expressiveness of C++ means that optimization
effort can be, and routinely is, captured in libraries where it benefits every
user. Because optimization effort is amortized over all users, more attention
can be devoted to it -- and, again, routinely is.

Powerful libraries that can eke out machine potentialities without compromise
and deliver them to many users, to compose with other powerful libraries, make
a language fast and quick to code in.

C++ isn't the only language good for capturing optimization in libraries. Rust
is good and getting better fast. I don't know about others. D, probably.

The MLs and Haskell could be good in this way if they were not saddled with
obligate GC.

------
taylodl
The article presents no evidence that Pascal is faster than C++ other than in
a given amount of time the Pascal programmer will have more time to optimize
than the C++ programmer - and no citation is provided for that statement
either.

No mention is made of modern Pascal development environments and libraries
needed to build modern applications. My experience is Pascal peaked in the
90s. What tools and libraries would I use today?

These are the interesting questions I would expect an entry such as this to
touch on.

~~~
sandeepc24
`What tools and libraries would I use today?`

[https://www.embarcadero.com/products/delphi](https://www.embarcadero.com/products/delphi)
[https://www.elementscompiler.com/elements/oxygene/](https://www.elementscompiler.com/elements/oxygene/)

~~~
clouddrover
And open source tools like Free Pascal:
[https://www.freepascal.org/](https://www.freepascal.org/)

And Lazarus: [https://www.lazarus-ide.org/](https://www.lazarus-ide.org/)

------
jwkane
15 years ago, the conventional wisdom (for whatever that is werth), was that
C++ and Pascal produce similarly efficient compiled binaries. You could cherry
pick examples that would show one or the other was "faster".

Clearly C++ has has a whole lot more neurons grinding on how to better
optimize it over the last 15 years. That should be good meat for an rich and
enlightening article.

Instead we get bunk. Code times for Pascal vs. C++ with experienced developers
are similar. I've written quite a bit of both. If you want to play ridiculous
code-time games you might as well argue that Python is faster than C++.

I would be interested in a real head-to-head of modern pascal vs C++ including
compile time. But that require a lot of real work where a fluffy thing like
this only requires an opinion.

------
drallison
This article is rife with questionable and incorrect statements and is missing
any convincing data.

