View Single Post
Old 14 August 2018, 23:39   #52
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 863
Quote:
Originally Posted by zero View Post
On 68000 the compiler can cause massive slow downs for stuff like matrix maths.

If you hand optimize the inner loops they can be orders of magnitude faster just by managing registers better.
Orders of magnitude!?

Again, I'm not saying that C compilers generate code that can compete with properly optimised assembly, but that does seem like an exaggeration to me. Like I pointed out earlier, there are in fact quite a few commercial Amiga games that where written fully or almost fully in C (just about all the stuff made by Westwood for instance).

These tend to be slower paced games, yes. But even then, most of them will include at least some multidimensional array accesses and operations between items in one or more of such arrays. That's awfully close to what matrix operations do (really differing only in the operations done), and yet - these games are perfectly playable.

In short, I'm not seeing it - if C compilers back in the day truly made code that was that much slower, we'd never see anything of any serious complexity made in C - it would be far to slow.

Now I could still be wrong, but I would like to see some examples of such a big difference. A difference, sure. A big difference (say two to four times)? Possible.

But 100's or 1000's? No, that doesn't seem right at all.
Quote:
Even the best C compilers on the most popular architectures often don't do the best job with register management because they have a lot of rules to enable function/library calls.
This is quite true, but I feel (like I said above) that this effect will have less of an impact than you seem to suggest. It'll definitely slow things down though.
roondar is offline  
 
Page generated in 0.08186 seconds with 11 queries