| To: | REALbasic Games <realbasic-games at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Game engine test |
| From: | Asher Dunn <asher at fireyesoftware dot com> |
| Date: | Sat, 25 Mar 2006 16:20:40 -0500 |
| 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> |
On Mar 25, 2006, at 3:49 PM, Lo Saeteurn wrote: Is memoryblock.byte(offset) not equivalent to characters of myarray[offset] in C? Why the difference in speed? 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. -- Asher _______________________________________________ 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> |
|---|---|---|
| ||
| Previous by Date: | Re: Game engine test, Mike Woodworth |
|---|---|
| Next by Date: | Re: Game engine test, Lo Saeteurn |
| Previous by Thread: | Re: Game engine test, Mike Woodworth |
| Next by Thread: | Re: Game engine test, Lo Saeteurn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |