homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients corona10, ronaldoussoren
Date 2018年07月02日.19:00:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530558013.57.0.56676864532.issue33955@psf.upfronthosting.co.za>
In-reply-to
Content
@ronaldoussoren
I updated the PR and we need some discussion.
I benchmarked new patch with Fibonacci codes.
baseline(master): 21.330535484 
without call sysctlbyname(PR 8046): 22.857963209 secs
with call sysctlbyname(PR 8046): 37.125129114 secs
So my choice is just believe pthread_get_stacksize_np() like rust do. (https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/thread.rs#L246)
code:
def fib(n):
 if n == 0:
 return 0
 if n == 1:
 return 1
 return fib(n-2) + fib(n-1)
if __name__ == '__main__':
 import timeit
 print(timeit.timeit("fib(10)", setup="from __main__ import fib"))
History
Date User Action Args
2018年07月02日 19:00:13corona10setrecipients: + corona10, ronaldoussoren
2018年07月02日 19:00:13corona10setmessageid: <1530558013.57.0.56676864532.issue33955@psf.upfronthosting.co.za>
2018年07月02日 19:00:13corona10linkissue33955 messages
2018年07月02日 19:00:13corona10create

AltStyle によって変換されたページ (->オリジナル) /