Re: Option Explicit



"Warrio" <warrio@xxxxxxxxxxx> wrote in message
news:46782ee8$0$3825$5402220f@xxxxxxxxxxxxxxxxxx
Thanks for the advice ; )

but I thought that Access reserves a place in the memory only when you
intialize the variable with a data not on the Dim statment?!?

No, not quite.

With a string, or variant, then yes..the storage is not allocated until
runtime, because you don't know the size of the variable.

However, with fixed length strings, integers, long, currency etc, they
actually default to a value of zero, and the storage is allocated at
runtime..even if you DO NOT set their values....

I am surprised that the "analyzer" suggests to use option explicit. It does
mean that some variable defences will be pre-made, and thus some speed up
might occur, but you not going to measure it by much. I also suspect that
suggestion remains from 14 years ago, and back then..it would make a
diference.

The problem is that access today can easily run 80 million instructions in a
second. So, even if saved a million instructions that still only 1/80th of a
second. And, when is the last time you ran 80 million instructions? those
old comptuers ran at 8mhz, and today were at 3 ghz.

ms-access has not bee processing bound for about 7+ years now. So, if you
increase the processing speed of your computer, you will not see a
improvement in the speed of your code. The speed of memory, disk drive, and
of course in multi-user with a network are all factors FAR more important
then optimizing some processing. Where optimizing today pays off is to
reduce i/o.....not processing....

While access can execute a command to retrieve a record in a instant, you
then have to wait for the operation system, memory, and the disk drive to
get that data. We are i/o bound for the most part...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@xxxxxxx


.



Relevant Pages

  • Re: Superstitious learning in Computer Architecture
    ... Without a LOT of logic or some other better approach, re-executing the instructions requires re-decoding and it ties up the cache memory bus transferring more data as instructions than the instructions are working on. ... There is most of an order of magnitude in speed sacrificed by even HAVING a cache in a single ALU system, and more than an order of magnitude in multiple-ALU systems! ...
    (comp.arch.arithmetic)
  • Re: shared memory between processes
    ... It's not optimizing it away, but the optimizer _is_ allowed to cache ... the memory location. ... That would be right on a uniprocessor machine, since instructions (with ... _two_ bus accesses, and other CPUs can access the memory after the first ...
    (comp.os.linux.development.system)
  • Re: Iyonix instruction timings and RAM speed results
    ... I get 166/127 for main RAM and 5.7/62 for PCI Video memory on my original ... unrolled LDM/STM instructions for these, ... "add floating point" instruction takes almost 200 clock cycles, ... MOV R0,R0,LSL #1 ...
    (comp.sys.acorn.misc)
  • PART 3. Why it seems difficult to make an OOO VAX competitive (really long)
    ... implementations, compared to high-performance RISCs, but also to IA-32. ... "The VAX is so tied to microcode we predict it will be impossible to ... most frequently-used instructions can be converted to a small number ... given the increasing relative latency to memory. ...
    (comp.arch)
  • Re: Cost of calling a standard library function
    ... > sense, since push Allocates memory, and pop deallocates it. ... Hence, all the CPU does is, basically: ... so forth...it's even possible to get "free" instructions (effectively ... what else is an ASM coder's job? ...
    (alt.lang.asm)

Loading