realbasic-games
[Top] [All Lists]

Re: Game engine test

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Game engine test
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Sat, 25 Mar 2006 13:29:48 -0800
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20060317180027 dot 96F56117533D at lists dot realsoftware dot com> <4424B89C dot 2010408 at optusnet dot com dot au> <8268A93C-A492-41B9-A867-091978805AC2 at miensoftware dot com> <12B1852E-DE58-4871-A997-E7D44E40CBF4 at mindspring dot com> <BF4347D4-DEA4-4533-87BE-BEB12B106D91 at miensoftware dot com> <5FA27ACF-802D-4210-80DA-7E31FF0AAF60 at chaoticbox dot com> <F8DC5A9A-4050-4894-B0DF-9F62E48EA45E at miensoftware dot com> <8AB344CF-F35A-4A6D-B0FD-2E607E71D2F2 at chaoticbox dot com> <44D60B02-54A3-443F-9928-9C7D2287B8E1 at miensoftware dot com> <c4bb46d8e4d985840c29f77cba34d208 at fireyesoftware dot com>
Why would RS do it this way when #pragmas for bounds checking is off? So are RB arrays faster than memoryblocks? I thought memoryblocks were the fastest thing in RB. Learning how much faster a simple array in C compared to a basic (harder-to-use) memoryblock is not encouraging...

Are RB arrays using methods to get the data as well? They must be special tables.

myarray[offset] is simply pointer lookup. All accessors on memoryblocks are methods; they perform bounds and endian checks. While bounds checking is nice (you can't shoot yourself in the foot by writing into someone else's memory), the function overhead and all the checks that are performed make it slow.

Proportionally, the function overhead and the checks are much more work than actually reading or writing the data.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>