Recent

Author Topic: What is the FASTEST Computer Language? 45 Languages Tested!  (Read 32264 times)

rsz

  • New Member
  • *
  • Posts: 45
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #30 on: August 13, 2021, 11:39:56 pm »
On the benchmarks game website, take a look at Free Pascal n-body vs GCC C++ n-body, the C++ one has manual SIMD intrinsics. Some benchmarks also compare single threaded to multi threaded.

The results should not be taken at face value without reading the source of both programs, but I doubt anyone who is looking to decide on a language or looking for some quick numbers will actually read the source.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #31 on: August 14, 2021, 01:36:00 am »
https://www.youtube.com/watch?v=HWpi9n2H3kE

ALL compilers end to build machine code. so if the programmer knows machine code concepts and specific compiler tricks to achieve better machine code then ANY BENCHMURK is JUST CRAP and waste of time. this is true for DECADES.... any compiler no matter the language
« Last Edit: August 14, 2021, 01:38:11 am by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

BeniBela

  • Hero Member
  • *****
  • Posts: 906
    • homepage
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #32 on: August 14, 2021, 01:59:50 am »
Or this: https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf

Looks like all the fastest languages  have an LLVM version

Even Intel just moved their compiler to LLVM. If Intel does not have the resources to maintain the optimizations necessary for a fast compiler, it is hopeless for FPC. If FPC wants to be the fastest language, the LLVM mode should be the default

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #33 on: August 14, 2021, 01:39:21 pm »
Or this: https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf

Looks like all the fastest languages  have an LLVM version

Even Intel just moved their compiler to LLVM. If Intel does not have the resources to maintain the optimizations necessary for a fast compiler, it is hopeless for FPC. If FPC wants to be the fastest language, the LLVM mode should be the default

Hm, looking at table 5 of said report one could also come to the conclusion that Pascal is the second best language after C when considering the trinity of execution speed, memory and energy consumption. I couldn't identify the actual Pascal compiler used (but I only x-read the report) - however I do pass this result to the core dev team of Free Pascal with great respect.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #34 on: August 14, 2021, 02:00:51 pm »
Or this: https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf

Looks like all the fastest languages  have an LLVM version

Even Intel just moved their compiler to LLVM. If Intel does not have the resources to maintain the optimizations necessary for a fast compiler, it is hopeless for FPC. If FPC wants to be the fastest language, the LLVM mode should be the default

What is the LLVM overhead in terms of files etc.? At present an FPC compiler is defined by a single file in (e.g.) /usr/local/bin which knows where to find the associated backend files: I'm concerned that relying on LLVM might change that and it would risk an almighty mess of different LLVM versions and variants brought in by the basic OS and user-installed development tools.

Apart from that, I believe that one of the core developers (Jonas?) highlighted an LLVM shortcoming a few weeks ago... possibly something to do with floating point exceptions?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #35 on: August 14, 2021, 08:21:13 pm »
Or this: https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf

Looks like all the fastest languages  have an LLVM version

Even Intel just moved their compiler to LLVM. If Intel does not have the resources to maintain the optimizations necessary for a fast compiler, it is hopeless for FPC. If FPC wants to be the fastest language, the LLVM mode should be the default

SMH

your link is about energy....!

Either you talk speed either yoou talk energy saving ... make your choice LOL inject 2L gas / 100km in a ferrari or 50L / 100km
thats not the same problem at all
cheers
 :D :D :D :D :D
what did you expect then? ferrari faster than bike? tooooo baaaaad
ROFL
« Last Edit: August 14, 2021, 08:26:55 pm by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #36 on: August 14, 2021, 10:32:20 pm »
If FPC wants to be the fastest language, the LLVM mode should be the default
Not something the core team will ever do, reading at this wiki article, even if they do admit on certain programs (that typically benchmarks focus on) LLVM does generate a faster code.

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #37 on: August 14, 2021, 10:46:05 pm »
Looks like all the fastest languages  have an LLVM version.

You are welcome to test-support-continue the already well advanced mselang project.

Fre;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #38 on: August 15, 2021, 10:28:03 am »
Hello @Fre;D,


[off topic /on]

I have a question about mseide-msegui. If I understand correctly, there are visual controls (of msegui) that are drawn by calls to X11 (like fpGUI). I know that fpGUI has an independent package (fpgui_ide.lpk) that I just need to be required in a Lazarus project in order to create an X11 application (I also know that you have written an IDE-designer in order to create X11 RAD forms).

My question - general culture - is: is there a msegui package (*.lpk) that can be also required from a Lazarus project (really sorry, I'm just an application builder knowing nothing about compilers; no more time to disperse myself towards something else, different from Lazarus [^])? If so, are the msegui and fpGUI controls compatible, adaptable (in a same X-11 application, rather targeted at the base for a true graphic server having no desktop installed on it, AFAIK the boundary between Wayland and X11)?


[^] just to understand how to turn around the --pcp in order to create an organisational pattern to put me back into the context of an old release (historised with SVN) and debug it, was a huge intellectual effort\challenge for me :D.

[off topic /off]


« Last Edit: August 15, 2021, 11:37:57 am by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5462
  • Compiler Developer
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #39 on: August 15, 2021, 01:27:45 pm »
If FPC wants to be the fastest language, the LLVM mode should be the default

No one said that this is our goal. Yes, we want FPC to generate good, fast code, but speed is not everything.

Seenkao

  • Hero Member
  • *****
  • Posts: 549
    • New ZenGL.
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #40 on: August 15, 2021, 03:01:40 pm »
If FPC wants to be the fastest language, the LLVM mode should be the default
Я не думаю, что это хорошая идея! Заглядывать и оптимизировать код - это да. Но менять одно на другое? Зачем? Что нельзя сделать, что уже сделано в LLVM?

Я занимаюсь разработкой и постоянно смотрю код, который получаю в конце компиляции. Если мне не нравится этот код, я стараюсь его улучшить. Я понимаю, что определённый код меня не устроит. По сути, лучший код ни один компилятор вам не сделает. Но компилятор достаточно неплохо оптимизирован. И, вам не нужно оптимизировать каждую свою строчку кода, для улучшения конечного кода (по простой причине, что за вас многое уже сделали).

Google translate:
I do not think it's a good idea! Peeking in and optimizing the code is yes. But change one for the other? What for? What cannot be done, what has already been done in LLVM?

I am doing development and constantly looking at the code that I get at the end of compilation. If I don't like this code, I try to improve it. I understand that a certain code will not suit me. In fact, no compiler will make the best code for you. But the compiler is quite well optimized. And, you don't need to optimize every line of your code to improve the final code (for the simple reason that a lot has already been done for you).

To improve / speed up your code, you should watch code that is constantly being executed. If you can minimize / optimize it, then this will be the end result. You! And only YOU! The person who will be responsible for your code! The compiler will take your code and optimize as "taught" it. Knowing how the compiler works, you can also improve the performance of your program!
Для улучшения/ускорения работы кода, вы должны смотреть код, который постоянно выполняется. Если вы его можете минимизировать/оптимизировать, то это и будет конечным результатом. Вы! И только ВЫ! Тот человек, который будет отвечать за ваш код! Компилятор примет ваш код и оптимизирует как его "учили". Зная работу компилятора, вы так же можете улучшить работу своей программы!
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #41 on: August 15, 2021, 03:15:00 pm »
[off topic /on]

Hello @Fre;D,

I have a question about mseide-msegui. If I understand correctly, there are visual controls (of msegui) that are drawn by calls to X11 (like fpGUI).

Hello Eric.
Correct.  Both fpGUI and MSEgui use direct call to X11 for Unix OS (Linux, FreeBSD and old XQuartz Mac OS), gdi for Windows.


 I know that fpGUI has an independent package (fpgui_ide.lpk) that I just need to be required in a Lazarus project in order to create an X11 application (I also know that you have written an IDE-designer in order to create X11 RAD forms).

The fpgui_ide.lpk contain only the path of the source of fpGUI.
It allows you to create also a Lazarus lpi project files compatible with fpGUI.
But you still need to use the fpGUI form-designer, fpGUI is not compatible with Lazarus form designer (and his object-inspector).

My question - general culture - is: is there a msegui package (*.lpk) that can be also required from a Lazarus project (really sorry, I'm just an application builder knowing nothing about compilers; no more time to disperse myself towards something else, different from Lazarus [^])?

There is no msegui-lpk at the moment but if you use ideU, there is a prj to lpi converter.
This will convert the mseide/ideU prj project into a lpi Lazarus project.
So, like for fpGUI, you may use Lazarus ide and all feature of the code editor but the Lazarus form-designer/object inspector will not work, you will need to use the MSEide/ideU form-designer/object inspector.

If so, are the msegui and fpGUI controls compatible, adaptable (in a same X-11 application, rather targeted at the base for a true graphic server having no desktop installed on it, AFAIK the boundary between Wayland and X11)?

fpGUI and MSEgui are two different project.  Their components are not compatible (but they use the same X11 pascal header to access the X11 libraries).
Andrew Haines translated Wayland-headers for fpc: https://github.com/andrewd207/fpc-wayland
He did also the interface Wayland/fpGUI but this is not yet totally working well.
Of course this could be used later for MSEgui too.
Also Graeme said that he will do a interface Mac-Cocoa/fpGUI (but it seems that he forgot it  :-[ ).

Fre;D

[off topic /off]
« Last Edit: August 15, 2021, 03:23:58 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #42 on: August 15, 2021, 03:33:03 pm »
If FPC wants to be the fastest language, the LLVM mode should be the default

No one said that this is our goal. Yes, we want FPC to generate good, fast code, but speed is not everything.

If fpc could optimize speed of float calculation and approach the speed of LLVM it would be great.

Fre;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #43 on: August 15, 2021, 08:57:45 pm »
[off topic /on]
@Fred, thank you very much for the time taken for your clarifications between fpGUI and MSEgui (I guess that only the way of drawing the controls is common; the main message loop - depending on the type of application - and their messages must be incompatible).
[off topic /off]
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: What is the FASTEST Computer Language? 45 Languages Tested!
« Reply #44 on: August 22, 2021, 04:56:23 pm »
Comparisons are odious, and benchmarks doubly so. However they can at the very least highlight a perception problem.

I've occasionally taken a look at Seed7, which is Pascal-like but simplifies a number of concepts and increases the language flexibility enormously. Using the Montecarlo benchmark at http://seed7.sourceforge.net/benchmks/montecarlo.htm I get a runtime like
Interesting idea. I also had such idea, when wanted to implement closures by myself. They're just syntax sugar around interfaces, so they should be easy to implement. But I don't have enough experience with FPC sources to do everything right and not brake anything. And then I realized, that it would be great to have extendable syntax. Even whole language could be build from scratch around compile-time extendable syntax. I would call it MetaPascal.
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

 

TinyPortal © 2005-2018