[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimization and C arrays (was Re: Return pointer to array: notpos
From: |
Marcus G. Daniels |
Subject: |
Re: optimization and C arrays (was Re: Return pointer to array: notpossible?) |
Date: |
01 Apr 1999 13:04:24 -0800 |
>>>>> "PJ" == Paul E Johnson <address@hidden> writes:
PJ> Is it not correct that when you have a C array,
PJ> and you grab item 5 with array[4], it uses less steps than
PJ> [SomeArray atOffset:4] to retrieve the same thing?
You can call getMemberBlock on an Array to get an address you can
repeatedly dereference into.
TB> 3) Avoid calling unnecessary operating system routines and using
TB> unnecessary I/O (especially disk I/O).
PJ> Can you give me an idea of how I can write periodic output into memory
PJ> and then save it at the end of the run, rather using fprintf at every
PJ> timestep?
printf is already buffered, so it should not be a massive source of
system calls. setvbuf can be used to increase buffering, if necessary.
==================================
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.
- Return pointer to array: not possible?, Paul E. Johnson, 1999/04/01
- Re: Return pointer to array: not possible?, Eric Werk, 1999/04/01
- Re: Return pointer to array: not possible?, Axel von Kamp, 1999/04/01
- Re: Return pointer to array: not possible?, Marcus G. Daniels, 1999/04/01
- optimization and C arrays (was Re: Return pointer to array: not possible?), Theodore C. Belding, 1999/04/01
- Re: Re: Return pointer to array: not possible, Eric Werk, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: not possible?), Marcus G. Daniels, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Paul E. Johnson, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?),
Marcus G. Daniels <=
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Theodore C. Belding, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Sven N. Thommesen, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Marcus G. Daniels, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Sven N. Thommesen, 1999/04/01