Re: State of Forth 200x




Andreas Kochenburger wrote:
On 8 Jun 2006 06:32:12 -0700, "George Hubert"
<georgeahubert@xxxxxxxxxxx> wrote:
Doing cloning at run-time would add a lot of
run-time overhead

Overhead? It's just ALLOCATE and MOVE to copy a small memory region,
and perhaps adjustment of a few pointers, if any.


If the objected is ALLOTed in the dictionary then the address is known
at compile time so a smart compiler (not W32F; at least the current
version, though the STC version (not V4.2stc) that Alex McDonald and
co. are (slowly) working on might be less dumb) could use techniques
like constant folding to produce shorter/faster code.
I've nothing against ALLOCATEd objects (the NEON model supports them as
well) if an object only might be needed, or a variable number of the
same type are needed (though if they're the same type then IMO a class
makes perfect sense), however there is a noticeable overhead (even in
dumb old W32F) in using them. IMO objects that are definitely needed
should be ALLOTed for performance reasons, with ALLOCATEd objects used
only for objects that might be needed.

Andreas
-------
Et ceterum censeo, TV esse delendam.

George Hubert

.



Relevant Pages

  • Re: Recursive subroutine for reading null-terminated string
    ... and any other call overhead. ... I thought that normal arrays are allocated a single ... and just before the ALLOCATE. ... for recursion up to that point. ...
    (comp.lang.fortran)
  • Re[2]: [PATCH][v2] fork_init: fix division by zero
    ... overhead before this patch: e.g. your implementation is finally boils ... common situation of small PAGE_SIZEs. ... can't allocate thread structs from highmem. ... Emcraft Systems, www.emcraft.com ...
    (Linux-Kernel)
  • Re: page sizes
    ... The documentation of malloc() on one of the ... Larger blocks allocate fastest if they are ... overhead by always putting chunks on cacheline boundaries (and wasting ...
    (comp.programming)
  • Re: missing madvise functionality
    ... mmap/mprotect, which have more fundamental locking requirements, more ... overhead and no benefits (except debugging, ... So far, when we allocate a new arena, we allocate address space with ...
    (Linux-Kernel)
  • Re: TV Pitchman Billy Mays.....dead at 50 OT
    ... prevents a head injury from luggage falling from the ... overhead. ... Americans worry whether the rest of the world ... considers us dumb, so we go to the polls and ...
    (alt.vacation.las-vegas)