4 responses to “Recursion in PowerShell … slow”

  1. Jeffrey Snover

    We did very little work on performance in V1. In particular, function overhead is very heavy in V1 but we are working on improving this in V2.

  2. Per Østergaard

    Hi

    Both the function and the filter is called recursively – you are just passing the input in two different ways – argument or pipeline. In fact, function and filter are just syntactical sugar for the same. These two definitions are the same:
    function test1{ process { $_ } }
    filter test2{ $_ }
    Try to do a type function:test2 and see the output.

    Best regards
    Per
    http://www.msgoodies.com

  3. Oisin

    Is the delay explained as simply as:

    function – filter = parameter binding

    ?