Click here to Skip to main content
15,886,137 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Neutralino Pin
Greg Utas28-Feb-21 2:51
professionalGreg Utas28-Feb-21 2:51 
GeneralRe: Neutralino Pin
#realJSOP28-Feb-21 3:24
mve#realJSOP28-Feb-21 3:24 
GeneralRe: Neutralino Pin
pkfox28-Feb-21 5:00
professionalpkfox28-Feb-21 5:00 
GeneralRe: Neutralino Pin
Espen Harlinn28-Feb-21 6:50
professionalEspen Harlinn28-Feb-21 6:50 
GeneralRe: Neutralino Pin
Nelek28-Feb-21 9:48
protectorNelek28-Feb-21 9:48 
GeneralRe: Neutralino Pin
Espen Harlinn28-Feb-21 10:45
professionalEspen Harlinn28-Feb-21 10:45 
GeneralRe: Neutralino Pin
trønderen28-Feb-21 15:29
trønderen28-Feb-21 15:29 
GeneralRe: Neutralino Pin
Espen Harlinn28-Feb-21 17:30
professionalEspen Harlinn28-Feb-21 17:30 
Quote:
Wasn't there a very similar issue with the first version of the classic Dhrystone benchmark?

I really don't know …

If the compiler can perform calculations up front, then that is a Good thing™; because, obviously, then the software doesn't have to do those calculations at runtime. C/C++, go, rust, and compilers for many other programming languages can do this pretty well.

Armadillo takes this pretty far, and is a good example when it comes to demonstrating the performance gains that can be achieved.

The point I am trying to make is that most of the CPU time, and other resources, used by most applications are wasted on things that has little, or nothing, to do with what the solution is actually supposed to be doing. The Python vs. C# vs. C++ is just one example of how choosing the wrong tool for the job can cost you. In my head Python is for configuring and orchestrating solutions implemented in native code.

If you just hate C++ and love scripting languages, use a decent one like Julia[^], it will execute something similar to the snippets I wrote, in about 0.77 seconds.

Another low-hanging fruit is to stop splitting solutions into a set of microservices. It is extraordinary rare that a system consisting of a bunch of microservices can compete with the performance of a monolith, and 99% of the software implemented as microservices does not process enough data to justify the horizontal scalability argument. Not only do people put network interfaces between what should have been implemented as libraries, they insist on sending the data as inefficiently as possible too (JSON/XML). If you really need to do this: use tools like FlatBuffers: FlatBuffers, Protocol Buffers, or Bond.

With libraries like Imgui you can create nice web based user interfaces, just take a look at: Dear ImGui JavaScript+WebGL example.

And, again, if you for some reason would like to use a language different from C++, there is a rust library that can be used to develop web applications: egui – An experimental immediate mode GUI written in Rust.

Once you have started to use web-assembly, it only makes sense to use web-sockets too, and then JSON is probably not your best choice for serializing data…

Better performance -> lower runtime costs
Espen Harlinn
Senior Architect - Ulriken Consulting AS

The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra

GeneralRe: Neutralino Pin
Daniel Pfeffer28-Feb-21 19:15
professionalDaniel Pfeffer28-Feb-21 19:15 
GeneralRe: Neutralino Pin
trønderen28-Feb-21 22:00
trønderen28-Feb-21 22:00 
GeneralRe: Neutralino Pin
Nelek28-Feb-21 23:03
protectorNelek28-Feb-21 23:03 
GeneralRe: Neutralino Pin
Jon McKee28-Feb-21 12:11
professionalJon McKee28-Feb-21 12:11 
GeneralRe: Neutralino Pin
Espen Harlinn28-Feb-21 12:53
professionalEspen Harlinn28-Feb-21 12:53 
GeneralRe: Neutralino Pin
Jon McKee28-Feb-21 20:23
professionalJon McKee28-Feb-21 20:23 
GeneralRe: Neutralino Pin
Espen Harlinn28-Feb-21 21:07
professionalEspen Harlinn28-Feb-21 21:07 
GeneralRe: Neutralino Pin
Jon McKee28-Feb-21 22:06
professionalJon McKee28-Feb-21 22:06 
GeneralRe: Neutralino Pin
Marc Clifton28-Feb-21 9:49
mvaMarc Clifton28-Feb-21 9:49 
GeneralRe: Neutralino Pin
#realJSOP28-Feb-21 11:02
mve#realJSOP28-Feb-21 11:02 
GeneralElectron? Pin
#realJSOP28-Feb-21 1:45
mve#realJSOP28-Feb-21 1:45 
JokeRe: Electron? Pin
Nelek28-Feb-21 1:51
protectorNelek28-Feb-21 1:51 
GeneralRe: Electron? Pin
Slacker00728-Feb-21 1:56
professionalSlacker00728-Feb-21 1:56 
GeneralRe: Electron? Pin
Greg Utas28-Feb-21 2:12
professionalGreg Utas28-Feb-21 2:12 
GeneralRe: Electron? Pin
CodeWraith28-Feb-21 4:51
CodeWraith28-Feb-21 4:51 
JokeRe: Electron? Pin
Maximilien28-Feb-21 12:10
Maximilien28-Feb-21 12:10 
GeneralRe: Electron? Pin
OriginalGriff28-Feb-21 2:10
mveOriginalGriff28-Feb-21 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.