Re: [AD] [ alleg-Bugs-1650580 ] Problem in fixed point library. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] [ alleg-Bugs-1650580 ] Problem in fixed point library.
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Sun, 04 Feb 2007 15:54:06 +0100
On Sun, 2007-02-04 at 07:44 -0700, Thomas Fjellstrom wrote:
>
> Please don't tell me these functions are defined per platform? I hate it when
> people do that.
>
Yes, it's messy.. but I guess, if we want the extra performance, there's
no way around it. The C compiler must be able to figure out from the .h
files what to do, because dereferencing a vtable at runtime wouldn't be
a good idea for time critical math functions. Hence, per-platform
inlined preprocessor magic :P
In D, I guess we would have something like:
version(DS) fixdiv(...) {...}
Just that it will be years until D supports such a platform it seems :)
--
Elias Pschernig