Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

imgui is a general approach to designing gui libraries proposed by casey muratori in 02005 https://www.youtube.com/watch?v=Z1qyvQsjK5Y; the particular library in question is omar cornut's 'dear imgui'

a gui that would use 100% of cpu on an 0.52-mips mac 512 https://netlib.org/performance/html/dhrystone.data.col0.html would probably use about 0.02% of cpu on one 2201-mips core of a raspberry pi 3 https://netlib.org/performance/html/dhrystone.data.col0.html

if you pessimistically multiply that by 32 to account for having 32 bits per pixel instead of 1, and by 12 to account for 1920×1080 instead of 512×342, it comes to 9%. of one of the cores! also it would run in 0.5% of the pi's ram

so, to a significant extent, the struggle is no longer to get something approximating your desired user interface running, but to imagine a user interface that's worth people's time to use. so it makes sense to trade off cpu consumption and ram usage for faster experimentation in a lot of cases



> it comes to 9%. of one of the cores! also it would run in 0.5% of the pi's ram

9% from one app, 9% from another, pretty soon we're talking about real power consumption / battery life

And even the 9% that you find trivial is something I, as an user, could use for something that gives me a benefit instead of your game-like GUI.

> so it makes sense to trade off cpu consumption and ram usage for faster experimentation in a lot of cases

It does not. If it has nothing animated, you'd better not redraw it. Anything else is lack of respect for the user's resources.


yes, you wouldn't be able to run more than about 450 such apps concurrently on the pi before they started to get slower. (if you were concerned about battery life, you wouldn't be using a pi; there are alternatives with orders of magnitude lower power usage, some of which can even run linux. but there's no way for a pi to use an amount of energy that's significant next to a human being, let alone a refrigerator or a car)

but 9% is really very pessimistic. 0.05% is a more realistic number

users are 100% entitled to spend their resources on whatever apps they think is worthwhile, and of course to spend their time programming their computers as inefficiently or efficiently as they want


> 450 such apps concurrently

this should read '45 such apps concurrently'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: