![]() I think you are a bit harsh on using the API directly. ![]() On Delphi it was trivial to do without butchering the layout by using the anchoring system and panels. ![]() If they did let you resize then the list box would stay small. I never found changing the screen resolution to be a problem, on the contrary it was very good, and compare to the many Microsoft developed apps still won't let you resize a dialog to make a tiny list box bigger. I think bare-bone RPi programmed with Pascal is a great idea.Īh yes - the changing DPI/font sizes was an issue I remember. Unfortunately, there's no standard in Pascal and compilers are not common, so often you're stuck with C. I would rate it better than C/C++, and I don't really understand why OP says it is slower than C. However, anyone using Delphi would rather think of it as Visual IDE and VCL rather than a Pascal compiler. It was very efficient, worked fast and produced very good code. The Pascal compiler which shipped with Delphi had no connection to VCL. Of course, it still was much better than VB, not to mention Java. I don't know if they fixed all the problems later, I stopped using VCL long time ago. However, to make VCL compliant with the visual design they added lots of stuff, which increased the amount of compiled code and slowed down execution. The only benefit was visual design which looks great at first, but then you would notice it didn't scale well across screen resolutions and font sizes, so the benefit was dubious. It didn't really provide any benefits compared to using plain Windows API, and sometimes even made such use more difficult. That’s been known for years, but if you want to optimize your program for battery life/low power, some of the routines would have to be optimized in C, assembler, SIMD instructions, or custom instructions for accelerators.VCL was a huge library which wasn't very well thought out. The study also ranked each language with different combinations of objectives mixing time, memory, and energy parameters, and C is always at the top with those metrics. Considering MicroPyhon is now running on a wide range of microcontrollers, I suspect it may not be as bad on those platforms with a smaller footprint, and it would be interesting to find out the difference. It should be noted all tests were performed on a machine based on an Intel Core i5-4460 Haswell CPU 3.20GHz with 16GB of RAM, and running Ubuntu Server 16.10 operating system with Linux 4.8.0-22. Go is the worst language from the compiled languages category, and it’s even worse than languages relying on a VM like Java or Erlang, at least with the binary-trees sample used.īut the crown of the most inefficient languages goes to interpreted languages like Perl, Lua, or Python, and that’s by some margin. To the surprise of no one, the study concludes that “compiled languages tend to be, as expected, the fastest and most energy-efficient ones”.C and C++ languages are the most efficient and fastest languages. The study goes through the methodology and various benchmarks, but let’s pick the binary-trees results to illustrate the point starting with compiled code. ![]() C is the uncontested winner here being the most efficient, while Python, which I’ll now call the polluters’ programming language :), is right at the bottom of the scale together with Perl. As a former software engineer who’s mostly worked with C programming, and to a lesser extent assembler, I know in my heart that those are the two most efficient programming languages since they are so close to the hardware.īut to remove any doubts, a team of Portuguese university researchers attempted to quantify the energy efficiency of different programming languages (and of their compiler/interpreter) in a paper entitled Energy Efficiency across Programming Languages published in 2017, where they looked at the runtime, memory usage, and energy consumption of twenty-seven well-known programming languages.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |