On 10/02/2022 21:43, Friedrich Rentsch wrote:
I believe to have observed a difference which also might be worth
noting: the imbedded function a() (second example) has access to all
of the imbedding function's variables, which might be an efficiency
factor with lots of variables. The access is
I agree with Chris. I don't know if it was already written: if you
want a local function for speed reasons, you can use the classic
approach of a main function.
--
https://mail.python.org/mailman/listinfo/python-list
I believe to have observed a difference which also might be worth
noting: the imbedded function a() (second example) has access to all of
the imbedding function's variables, which might be an efficiency factor
with lots of variables. The access is read-only, though. If the inner
function writes
On 2/10/22, BlindAnagram wrote:
>
> This is exactly what I felt too but I then wondered if the code was
> recreated dynamically or was static with just a reference being created
> on each invocation of the parent. The overhead in this case would be
> negligible. But then I thought 'what about the
On 10/02/2022 16:52, Rob Cliffe wrote:
On 10/02/2022 12:13, BlindAnagram wrote:
Is there any difference in performance between these two program layouts:
def a():
...
def(b):
c = a(b)
or
def(b):
def a():
...
c = a(b)
I would appreciate any insights on wh
On Fri, 11 Feb 2022 at 03:57, Rob Cliffe via Python-list
wrote:
> But of course, performance is not the only consideration, as per Chris
> Angelico's answer.
Yep. In fact, I'd say that performance is the least significant
consideration here; do what makes sense. The time difference will be
neglig
On 10/02/2022 12:13, BlindAnagram wrote:
Is there any difference in performance between these two program layouts:
def a():
...
def(b):
c = a(b)
or
def(b):
def a():
...
c = a(b)
I would appreciate any insights on which layout to choose in which
circumsta
On 10/02/2022 15:20, Chris Angelico wrote:
On Fri, 11 Feb 2022 at 02:13, BlindAnagram wrote:
Is there any difference in performance between these two program layouts:
def a():
...
def(b):
c = a(b)
or
def(b):
def a():
...
c = a(b)
I would
On Fri, 11 Feb 2022 at 02:13, BlindAnagram wrote:
>
> Is there any difference in performance between these two program layouts:
>
> def a():
> ...
> def(b):
> c = a(b)
>
> or
>
> def(b):
> def a():
> ...
> c = a(b)
>
> I would appreciate any insights on
Is there any difference in performance between these two program layouts:
def a():
...
def(b):
c = a(b)
or
def(b):
def a():
...
c = a(b)
I would appreciate any insights on which layout to choose in which
circumstances.
--
https://mail.python.org/mailman/l
10 matches
Mail list logo