Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / are memblocks faster than variables

Author
Message
Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 25th Feb 2008 18:37
I saw a question similar to this only with files. But is it faster to store every value in a memblock or a variable?

Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 25th Feb 2008 20:16
please, I really need to know. It would make sense to me that memblocks would be faster as the computer knows the memory address something i assume it would have to search for in a variable but im not sure.

Your signature has been erased by a mod - please limit your signature to 600x120
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 26th Feb 2008 02:42
Memblocks shouldn't be used simply for storing information for general use like with a variable. Memblocks are used primarily for editing various forms of media, such as images and meshes. You can also use them to write information and save it as a file. But no, for constant referencing throughout your program, you should use variables.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Feb 2008 22:38
(Though I once did a pretty freaky trick using a memblock as an array of floats for a terrain heightmap thingy in memory so I wasn't using gfx memory like with a bitmap or something... allowed fast ground height checking with a little lerp (interpolation) math!)) Yes array woulda worked - but I liked it!

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Feb 2008 12:33
Jason's description is a perfect example of when you would use a memblock. Lots of data manipulation on lots of data.

Login to post a reply

Server time is: 2024-11-25 07:25:48
Your offset time is: 2024-11-25 07:25:48