Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #59715

Re: allot which initialize the alloted space ?

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: allot which initialize the alloted space ?
Date 2017-05-22 11:22 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2017May22.132217@mips.complang.tuwien.ac.at> (permalink)
References <ofrun4$e80$1@dont-email.me> <9dc8fce7-889a-40ca-b57c-382d3569620f@googlegroups.com> <ofsapd$le7$1@dont-email.me> <be9ff482-b5c2-41e7-a06b-dc9d1f8571eb@googlegroups.com> <ofsecg$1mu$1@dont-email.me>

Show all headers | View raw


Ron Aaron <rambamist@gmail.com> writes:
>> As for the time that it takes to initialize data to zero, I don't worry about that. Modern processors are pretty fast! 
>
>Memory speed is not insignificant, and is considerably slower than
>processor speed.  If the data being initialized is (for example) a 10000
>byte long buffer, then the memory initialization time is significant,
>and if it's happening in a time-critical loop, you won't want to do the
>extra work.

Because memory speed is significant, it can actually be more efficient
to zero out the memory before use than to load it from main memory
(which typically happens when you write only a part of a cache line):
Zeroing out can be performed as a pure cache operation.  Of course, a
lot of circumstances play a role: Is the memory area under
consideration currently in the cache or not, how bit is it, will the
stores to it actually happen before the line is evicted from the
cache, etc.  Anyway, various architectures have instructions for
zeroing: E.g., Alpha has WH64, PowerPC has dcbz, there is CLZERO in
recent AMD CPUs.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2017: http://www.euroforth.org/ef17/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

allot which initialize the alloted space ? Andreas Klimas <klimas@w3group.de> - 2017-05-21 13:50 +0200
  Re: allot which initialize the alloted space ? Coos Haak <htrofhc@gmail.com> - 2017-05-21 14:13 +0200
  Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-21 08:01 -0700
    Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 18:16 +0300
      Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-21 09:02 -0700
        Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 19:17 +0300
          Re: allot which initialize the alloted space ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 11:22 +0000
          Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-24 08:03 -0700
            Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-24 16:58 +0100
        Re: allot which initialize the alloted space ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 07:40 +0000
          Re: allot which initialize the alloted space ? Mark Wills <markwills1970@gmail.com> - 2017-05-22 08:02 -0700
            Re: allot which initialize the alloted space ? "HAA" <someone@microsoft.com> - 2017-05-24 16:40 +1000
          Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-22 13:27 -0700
      Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 17:16 +0100
        Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 19:22 +0300
          Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 18:03 +0100
          Re: allot which initialize the alloted space ? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-21 20:46 +0200
            Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 20:34 +0100
      Re: allot which initialize the alloted space ? "HAA" <someone@microsoft.com> - 2017-05-24 16:41 +1000
  Re: allot which initialize the alloted space ? Julian Fondren <julian.fondren@gmail.com> - 2017-05-21 08:36 -0700

csiph-web