[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speed Question...
From: |
jalex |
Subject: |
Re: Speed Question... |
Date: |
Wed, 17 Nov 1999 09:38:15 -0800 (PST) |
Darren Schreiber writes:
> I've never used a C array to store (id)'s, is that possible and is that
> what you are meaning?
Objective-C's variable type "id" is just a generic pointer.
Consequently, an array of id's can be declared using the standard C
syntax
id an_array[ARRAY_SIZE];
with the memory required simply being ARRAY_SIZE * sizeof(id). (I
believe sizeof(id) = 4 bytes, on most machines.) If you don't need to
resize the array when the model runs, this is definitely the way to
go. Why? You can access any location in the array in constant time
(which is true for Swarm's Array class), and not incur the overhead
required for passing messages, as you do with Swarm's Array class.
Cheers,
Jason
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Maps and LispArchiver, Benedikt Stefansson, 1999/11/16
- Re: Maps and LispArchiver, Benedikt Stefansson, 1999/11/16
- Speed Question..., Darren Schreiber, 1999/11/17
- Re: Speed Question..., Marcus G. Daniels, 1999/11/17
- Re: Speed Question..., Darren Schreiber, 1999/11/17
- Re: Speed Question..., Marcus G. Daniels, 1999/11/17
- Re: Speed Question..., Darren Schreiber, 1999/11/17
- Re: Speed Question...,
jalex <=
- Re: Speed Question..., Marcus G. Daniels, 1999/11/17