• Re: PROGRAMMING TODAY new approach in C strict runtime allows us to imp

    From fir@21:1/5 to Malcolm McLean on Wed Mar 20 15:06:15 2024
    Malcolm McLean wrote:
    On 20/03/2024 13:15, fir wrote:

    the idea is then compiler met the queue keyword it
    not generates call to function but stores the pointer to it and
    the arguments into separate runtime 'list' (it is internal array)
    and then continues execution of the parent function


    And we need big stacks so that people can use poor programming
    approaches without the system falling over, and we need small stacks
    becausem whilst modern stacks are usually just in cached main memory, if stacks are small then potentially the hardware people can manufacture
    very fast and as a tradeoff therefore very low capacity, special memory
    to use for the stack.


    nah thet talking on low stacks is probably bulshit...there is a thing called "hardware prefetchers" and if you use that stack liek an array (and that
    what as i describe is like that its an 'list') then you got it totally pre-cached...see my other threads i incidentally was writing as an
    answer of what said somewhat "against" stacks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From fir@21:1/5 to fir on Wed Mar 20 15:12:05 2024
    fir wrote:
    pre-cached...see my other threads i incidentally was writing as an
    answer of what said somewhat "against" stacks

    of what YOU said somewhat "against" stacks [errata]

    (my conclusion is there is probably no need to fear/avoid
    setting stack to 100 MB if yur machine has 4GB+ of ram
    - and if you set it just use it

    and if it will slow down programs at least i would like to observe that differences which presently i doubt (as stack is the same ram as heap
    and static)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to All on Wed Mar 20 14:52:13 2024
    Malcolm McLean wrote:
    On 20/03/2024 13:15, fir wrote:

    the idea is then compiler met the queue keyword it
    not generates call to function but stores the pointer to it and
    the arguments into separate runtime 'list' (it is internal array)
    and then continues execution of the parent function


    And we need big stacks so that people can use poor programming
    approaches without the system falling over, and we need small stacks
    becausem whilst modern stacks are usually just in cached main memory, if
    stacks are small then potentially the hardware people can manufacture
    very fast and as a tradeoff therefore very low capacity, special memory
    to use for the stack.

    Speaking as someone works in processor design, I'd point out that
    modern L1 caches have a three-cycle[*] latency (call it a nanosecond at
    3Ghz). As the stack is just regular memory in all modern
    processors, accesses to the stack are almost free so long
    as they're present in the L1 cache.

    Dedicated SRAM on-chip to support a "special memory stack"
    would not be any faster and would cost valuable area on the
    die and would result in strange software workarounds to
    work with the limited stack and extra context switching overhead
    to save and restore the 'special memory stack'.

    Note that most modern processors have an on-chip return stack
    to aid in reducing pipeline bubbles during function return.

    [*] Load to use

    And your characterization that big stacks are required because
    of 'poor programming approaches' shows a lack of understanding
    of modern programming workloads.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From fir@21:1/5 to fir on Wed Mar 20 17:16:29 2024
    fir wrote:
    PROGRAMMING TODAY new approach in C strict
    runtime allows us to improve reccurency: call queue

    this article is kinda prima aprilis joke becouse it is fictional article
    in fictional magazine but the call queue idea seem to be okay imo

    maybe there is even something more in here becouse this idea edges
    somewhat with paralelisation - becouse those queued functions are
    something like async calls - though here are not executed in parralel
    but stored in list - but it is closed to paralelisation somewhat and
    maybe something more is also here like finding some way of doing more
    nice paralelism..i maybe will try to rething on it yet some later time

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)