Click here to Skip to main content
15,899,754 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
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 
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 
Espen Harlinn wrote:
If the compiler can perform calculations up front, then that is a Good thing™
Certainly. All optimization (that produces identical results) is a good thing.

But the purpose of timing/benchmarking is either to get an estimate of how fast one specific application, generated in one specific way, will run on one specific hardware configuration, or you want an estimate of how fast the application in theory might run on some given hardware.

In the first case, it makes little sense to benchmark some other application, maybe written in some other programming language and/or generated with other tools. In principle, any compiler (for any language) might do all the same kind of optimizations as any other compiler (for any language), such as compile time evaluation. If one compiler has implemented this, and another one has not, you are really benchmarking the effect of that optimization, not a different application (where various optimization techniques may be applicable or not) nor one language against another.

In the second case, you want to benchmark capabilities of a given runtime platform, independent of which application you are running. That was the purpose of benchmarks like Whetstone and Dhrystone - testing hardware, not development platforms. The results should be as independent of development platform (/compiler) as possible.

You cold point to a third alternative: You want to benchmark a development platform. But those results really say nothing about neither your application code as such (which may be processed on different platforms) nor of the programming language (which may be provided on different platforms).

For the last 25+ years or so, I have considered optimization to not be my responsibility. I do not write code to suit one compiler rather than another one, one IDE rather than another one. I decide the data structures and algorithms. Then I expect any compiler of any IDE to e.g. compile time evaluate all that can be compile time evaluated. Not every compiler is perfect, or complete with respect to optimization, so maybe a given compiler leaves some calculations to run time. But then the solution, as I see it, is to improve that compiler - not to switch to another programming language.
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
professional#realJSOP28-Feb-21 11:02 
GeneralElectron? Pin
#realJSOP28-Feb-21 1:45
professional#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 
GeneralRe: Electron? Pin
#realJSOP28-Feb-21 2:19
professional#realJSOP28-Feb-21 2:19 
GeneralRe: Electron? Pin
OriginalGriff28-Feb-21 2:26
mveOriginalGriff28-Feb-21 2:26 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   473 votes