Click here to Skip to main content
15,887,256 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: Come to the dark side - we have cookies! Pin
charlieg1-Jan-23 10:46
charlieg1-Jan-23 10:46 
GeneralRe: Come to the dark side - we have cookies! Pin
jmaida1-Jan-23 14:32
jmaida1-Jan-23 14:32 
GeneralRe: Come to the dark side - we have cookies! Pin
honey the codewitch1-Jan-23 18:27
mvahoney the codewitch1-Jan-23 18:27 
GeneralRe: Come to the dark side - we have cookies! Pin
jmaida2-Jan-23 14:56
jmaida2-Jan-23 14:56 
GeneralRe: Come to the dark side - we have cookies! Pin
charlieg2-Jan-23 15:54
charlieg2-Jan-23 15:54 
GeneralRe: Come to the dark side - we have cookies! Pin
honey the codewitch2-Jan-23 15:59
mvahoney the codewitch2-Jan-23 15:59 
GeneralRe: Come to the dark side - we have cookies! Pin
charlieg2-Jan-23 16:06
charlieg2-Jan-23 16:06 
GeneralRe: Come to the dark side - we have cookies! Pin
honey the codewitch2-Jan-23 16:24
mvahoney the codewitch2-Jan-23 16:24 
You can't afford to make one function call per pixel when drawing graphics. That's the only way binary interfaces can really work in this case. If I make a base pixel class and it needs to be squishy enough to accommodate a 24-bit HSV pixel and a 16-bit RGB pixel then every time I act on that pixel a couple of things happen

A) I need to call a function to get any actual usable color information off the thing, or to convert it to a different format.

B) In order to realistically make it "polymorphic" practically, the actual channel values would *have to be* scaled floats.

Now, one function call is not a big deal. Except multiply that times 320x240x30 times per second, on a 240MHz (or worse machine)

It's worse than that. Honestly, polymorphism costs so much comparatively because you can't even do batched pixel operations, like say, filtering multiple pixels at once because the data is no longer available, but rather it's hidden behind a generic binary interface.

Even on a PC I'd expect 10x improvement in performance using templates, which allow you to work with the pixels as a contiguous stream of data that they can act on natively rather than having to translate every element through a conversion interface that genericizes it.

I'm trying to explain it as best I can without actually getting into code. I hope that helps.
To err is human. Fortune favors the monsters.

GeneralRe: Come to the dark side - we have cookies! Pin
honey the codewitch2-Jan-23 16:30
mvahoney the codewitch2-Jan-23 16:30 
GeneralRe: Come to the dark side - we have cookies! Pin
BillWoodruff2-Jan-23 1:25
professionalBillWoodruff2-Jan-23 1:25 
GeneralThe catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter31-Dec-22 20:02
professionalKornfeld Eliyahu Peter31-Dec-22 20:02 
GeneralRe: The catastrophic outcome of COVID-19 Pin
David On Life31-Dec-22 20:28
David On Life31-Dec-22 20:28 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter31-Dec-22 21:49
professionalKornfeld Eliyahu Peter31-Dec-22 21:49 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Chris C-B31-Dec-22 20:29
Chris C-B31-Dec-22 20:29 
GeneralRe: The catastrophic outcome of COVID-19 Pin
OriginalGriff31-Dec-22 20:33
mveOriginalGriff31-Dec-22 20:33 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter31-Dec-22 21:48
professionalKornfeld Eliyahu Peter31-Dec-22 21:48 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Super Lloyd31-Dec-22 21:41
Super Lloyd31-Dec-22 21:41 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter31-Dec-22 21:50
professionalKornfeld Eliyahu Peter31-Dec-22 21:50 
GeneralRe: The catastrophic outcome of COVID-19 Pin
yacCarsten31-Dec-22 23:18
yacCarsten31-Dec-22 23:18 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter31-Dec-22 23:24
professionalKornfeld Eliyahu Peter31-Dec-22 23:24 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Super Lloyd1-Jan-23 9:14
Super Lloyd1-Jan-23 9:14 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Daniel Pfeffer31-Dec-22 23:32
professionalDaniel Pfeffer31-Dec-22 23:32 
GeneralRe: The catastrophic outcome of COVID-19 Pin
fgs19631-Jan-23 6:22
fgs19631-Jan-23 6:22 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Gerry Schmitz1-Jan-23 3:18
mveGerry Schmitz1-Jan-23 3:18 
GeneralRe: The catastrophic outcome of COVID-19 Pin
Kornfeld Eliyahu Peter1-Jan-23 3:24
professionalKornfeld Eliyahu Peter1-Jan-23 3:24 

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.