Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: vec_set or setting x,y,z manually [Re: Reconnoiter] #443602
07/21/14 11:25
07/21/14 11:25
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Reconnoiter
I think they should change fast to very fast in the manual, cause (at least I think) fast has a ring to it that you still need to be care of it cause otherwise you would think they just omitted it entirely in the manual.

Honestly, the performance mentioned in the manual is ambiguous at best and downright dangerous at worst.

Firstly, every function in there, not including blocking I/O operations, is blazing fast. Most will execute in the nanosecond area with some maybe taking up to a microsecond. By themselves, you will never ever notice any kind of performance hit from calling them. What matters is context, you can very well write code that performs incredibly bad despite only using functions marked as "fast", if you deliberately, or unknowingly, play against the CPUs branch predictors and pre-fetchers. And of course you can do it the other way around as well, writing code that only uses "slow" functions which achieves much much better performance by tweaking it so that the generated code plays perfectly with the CPU and is ordered in such a way that it has the maximum throughput you can get.

The thing is, context matters. A lot. You really ought to ignore the performance remarks in judging how fast your code will be, because 99% of the time, it will be blazing fast. If your game runs slow, get out a profiler to see what actually takes the time and then optimize these hotspots. Everything else is just wasted time.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: vec_set or setting x,y,z manually [Re: WretchedSid] #443603
07/21/14 13:09
07/21/14 13:09
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Originally Posted By: JustSid
If your game runs slow, get out a profiler to see what actually takes the time and then optimize these hotspots. Everything else is just wasted time.

And most of the time that "hotspot" will be rendering.
if your game is a relatively small project and unless you do something immensely stupid you will probably hit gpu bottlenecks long before cpu bottlenecks. And that will also probably be something stupid or unecessary(too much polygons or complex effects for scenery fillers/small props, missing lods etc. or I/O can cause hiccups when loading large shit on runtime)


3333333333
Page 2 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1