News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

saving power with asm...

Started by felipe, March 27, 2019, 03:35:04 AM

Previous topic - Next topic

felipe

i was reading how was the management engine of intel designed (at a high level) taking in consideration the mobile computing. so the engine is embeded in mobile devices too. anyway, one of the issues  into consideration for the design was how to safe power so to extend the battery of the device. and it said that whenever feasible you (the programmer) should privilege performance over memory consumption.
so i was thinking: "that's cool, using short instructions, saving some bytes here and there and trying to make your program fast is still usefull this days (you should know that a lot of people belive assembly is not worth it because compilers... :(), because mobile devices running big programs that uses a lot of memory would consume more battery each time."
so there you have, consider mobile users with their mobile devices battery when you do big apps in asm with this tip and you will be the king of the programming horizons... :t (well, you get the idea... :icon_mrgreen:)

Raistlin

So here's an interesting question eventually.
(You answered it already) Faster
code equals less power consumption.
BUT does data weigh anything ? Harddrive
before data versus harddrive full of data...
Are we screwing with gravity by accumulating
knowledge ? Will knowledge (via gravity) attract
more knowledge ? ( mistazism welcome  :icon_confused:)
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

TimoVJL

May the source be with you

daydreamer

Quote from: felipe on March 27, 2019, 03:35:04 AM
i was reading how was the management engine of intel designed (at a high level) taking in consideration the mobile computing. so the engine is embeded in mobile devices too. anyway, one of the issues  into consideration for the design was how to safe power so to extend the battery of the device. and it said that whenever feasible you (the programmer) should privilege performance over memory consumption.
so i was thinking: "that's cool, using short instructions, saving some bytes here and there and trying to make your program fast is still usefull this days (you should know that a lot of people belive assembly is not worth it because compilers... :(), because mobile devices running big programs that uses a lot of memory would consume more battery each time."
so there you have, consider mobile users with their mobile devices battery when you do big apps in asm with this tip and you will be the king of the programming horizons... :t (well, you get the idea... :icon_mrgreen:)
1:wonder what is best power consumption a complex calculation of a math function inside cpu/fpu or use memory with LUT?
2:I think its important to change mindset from polling and MSDOS way of game takes 100% of cpu power in a hard loop like old game to newer mindset of eventhandlers:for example put code in WMpaint and other messages and some games/apps dont need to run at several 100 frames per second,because android apps can also have OpenGL
3:you can do native apps,but I dont know if asm is possible,but to use C++ or C# and mostly think in assembly using the lowlevel << >> and other things that you know compiles into shifts,ands,ors,xors
big apps in asm,seem more likely to be most lots of image,3dmodels,sound fx/music 

how many of member here has computers with cpus that throttle up when needed?,I have that with my newest laptop and if I just put things in WM_paint its lowpower,but if I start to put lots of winapi calls in a loop that causes WM_paint messages, the cpu throttles up and I hear the cpu fan runs loud
I think that is the closest thing to know if your program is good lowpower or highpower
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

felipe

it says mobile devices and mobile endpoints. i assume with that, at least laptops. anyway i haven't finish the reading yet.  :idea:

daydreamer

this thread gave me the idea to experiment underclock my computer
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

K_F

All (most) silicon now days is created with MOS technology.
The higher the frequency of operation, the more power it uses.

What is more important is the transition time between logic states - The faster the transition time (higher frequency ;) ) the less power is used.
While the device sits idle in either binary state, it uses leakage (very low) power.

So if a piece of software can perform the same function faster and get back into cpu idle mode, the less power is consumed.
;)

'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

felipe

Now, that's a good tech info k_f  :t  :icon14: