Potential speed improvement?

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

Potential speed improvement?

by Echo » Tue Nov 06, 2012 20:49

I saw this change to speedup the mapgen: https://github.com/celeron55/minetest/commit/b701f8a878b7c76a33d7c3540a4b5e9c6e6b31ac
It replaced the slow pow function.

Then I stumpled upon this:
https://github.com/jordan4ibanez/minetest/commit/37d6c3a2f19854caf6dfeb352cb9f6c50bb52757
Ok, it's jordan4ibanez's fork, but it's the same in celeron55's in camera.cpp:
There is usage of slow sin- and pow-function in the digging and bobbing animation. There are faster ways for the sin-function: lookup-tables, approximations, interpolations... http://stackoverflow.com/questions/6091837/sin-and-cos-are-slow-is-there-an-alternatve

Is this worth to be optimized or is it fast enough because it's called only sporadically?
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Wed Nov 07, 2012 05:18

Any speedup is nice, since there's soooo much use the processor for in this game!
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Wed Nov 07, 2012 08:20

yes, please! will you do this?
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 2 guests

cron