realbasic-nug
[Top] [All Lists]

Re: High Performance Code (Was: Bitwise Shift operators)

To: "REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: High Performance Code (Was: Bitwise Shift operators)
From: Daniel Stenning <d0stenning at msn dot com>
Date: Sat, 29 Sep 2007 20:19:40 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Thread-index: AcgCza6L7OSr/G7AEdy8rgAbY5KfzA==
Thread-topic: High Performance Code (Was: Bitwise Shift operators)
Fair point.


On 29/9/07 20:16, "Frank Condello" <developer at chaoticbox dot com> wrote:

> On 29-Sep-07, at 2:37 PM, Daniel Stenning wrote:
> 
>> Talking of which, one bit of tedium I find myself having to do a
>> lot of
>> these days is assigning a memoryblock reference to a Ptr variable,
>> in order
>> that I can do high performance processing on memoryblocks. It makes
>> a hell
>> of a difference to use the Ptr dereferencing syntax instead of the
>> memoryblock methods.  I really wish there were a built in property
>> that just
>> always gave us the pointer to the memoryblock.  I have wrapper
>> "buffer"
>> class that does just this, but I still wish it were automatically
>> built in.
> 
> Any built-in Ptr property would have to be read-only and computed on
> every access since the address can and will change if the block is
> resized. For the sake of speed it's probably best to live with a
> subclass that exposes an "Address As Ptr" property that's assigned in
> overloaded Constructor and Size methods. Then just be careful to
> always access that directly, and never write to or cache it elsewhere.
> 
> Frank.
> <http://developer.chaoticbox.com/>
> 
> 
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
> 

Cheers,
Dan




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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