Re: atws

2018-02-22 Thread dieter
Larry Martell writes: > ... > I had 2.2.1. I updated requests to 2.18.4 and now when I import atws I get: > > No handlers could be found for logger "atws.connection" This is a warning (only), telling you that the "atws" package wants to log a message but there is not corresponding logging handler

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Terry Reedy
On 2/22/2018 8:36 PM, Python wrote: On Thu, Feb 22, 2018 at 11:29:53PM +1100, Chris Angelico wrote: The idea of the Fibonacci benchmark is to test how effectively an implementation manages large numbers of recursive function calls. Then, fib(36) would normally involve 48,315,633 calls. This ver

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Steven D'Aprano
On Fri, 23 Feb 2018 00:26:33 +, bartc wrote: > The point of the article was Julia vs. Python. You can't make Python > faster by switching to a faster algorithm; you have to use the same one > on both. No, the point of the article was to write Python code that is as fast as the Julia code. I

Re: File opening modes (r, w, a ...)

2018-02-22 Thread jfong
Lew Pitcher於 2018年2月23日星期五 UTC+8上午9時43分19秒寫道: > jf...@ms4.hinet.net wrote: > > > ast於 2018年2月22日星期四 UTC+8下午8時33分00秒寫道: > >> Hello > >> > >> I share a very valuable table I found on > >> StackOverflow about file opening modes > >> > >> If like me you always forget the details of > >> file opening

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Python
On Fri, Feb 23, 2018 at 01:27:53AM +, Steven D'Aprano wrote: > On Thu, 22 Feb 2018 17:53:30 +, bartc wrote: > > As I said, people keep missing the point. The fact this uses a grossly > > inefficient way of calculating Fibonacci seems to blind them to any > > other considerations. > > > > T

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Python
On Thu, Feb 22, 2018 at 11:29:53PM +1100, Chris Angelico wrote: > > The idea of the Fibonacci benchmark is to test how effectively an > > implementation manages large numbers of recursive function calls. Then, > > fib(36) would normally involve 48,315,633 calls. > > > > This version does only 37, g

Re: File opening modes (r, w, a ...)

2018-02-22 Thread Lew Pitcher
jf...@ms4.hinet.net wrote: > ast於 2018年2月22日星期四 UTC+8下午8時33分00秒寫道: >> Hello >> >> I share a very valuable table I found on >> StackOverflow about file opening modes >> >> If like me you always forget the details of >> file opening mode, the following table provides >> a good summary >> >>

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Steven D'Aprano
On Thu, 22 Feb 2018 17:53:30 +, bartc wrote: > On 22/02/2018 16:00, Steven D'Aprano wrote: >> On Thu, 22 Feb 2018 12:03:09 +, bartc wrote: >> >>> The idea of the Fibonacci benchmark is to test how effectively an >>> implementation manages large numbers of recursive function calls. >>> The

Re: File opening modes (r, w, a ...)

2018-02-22 Thread jfong
ast於 2018年2月22日星期四 UTC+8下午8時33分00秒寫道: > Hello > > I share a very valuable table I found on > StackOverflow about file opening modes > > If like me you always forget the details of > file opening mode, the following table provides > a good summary > >| r r+ w w+ a a+

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Rick Johnson
On Thursday, February 22, 2018 at 1:55:35 PM UTC-6, Jack Fearnley wrote: [...] > I realize that this thread is about benchmarking and not > really about generating fibonacci numbers, but I hope > nobody is using this code to generate them on a > 'production' basis, I've been raising the warning fl

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Chris Angelico
On Fri, Feb 23, 2018 at 11:31 AM, Steven D'Aprano wrote: > Big O analysis is never a substitute for actual timing measurements, and > the assumption behind Big O analysis, namely that only some operations > take time, and always constant time, is never correct. It is only an > approximation to the

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Steven D'Aprano
On Thu, 22 Feb 2018 19:55:08 +, Jack Fearnley wrote: > I realize that this thread is about benchmarking and not really about > generating fibonacci numbers, but I hope nobody is using this code to > generate them on a 'production' basis, > > Fibonacci numbers, any linearly recursive sequence

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread bartc
On 22/02/2018 14:02, Mark Lawrence wrote: On 22/02/18 12:03, bartc wrote: It might be a technique to bear in mind, but it is nonsensical to say this gives a 17,000 times speed-up over the original code. What makes you say that?  I have just run all of the code as given in the reference and

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Ian Kelly
On Thu, Feb 22, 2018 at 12:55 PM, Jack Fearnley wrote: > I realize that this thread is about benchmarking and not really about > generating fibonacci numbers, but I hope nobody is using this code to > generate them on a 'production' basis, > > Fibonacci numbers, any linearly recursive sequence for

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread bartc
On 22/02/2018 19:55, Jack Fearnley wrote: I realize that this thread is about benchmarking and not really about generating fibonacci numbers, but I hope nobody is using this code to generate them on a 'production' basis, Fibonacci numbers, any linearly recursive sequence for that matter, can be

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread ast
Le 22/02/2018 à 19:53, Chris Angelico a écrit : On Fri, Feb 23, 2018 at 2:15 AM, ast wrote: Le 22/02/2018 à 13:03, bartc a écrit : On 22/02/2018 10:59, Steven D'Aprano wrote: for count in 1, 10, 100, 1000: print(count, timeit("cache(maxsize=None)(fib)(20)", setup=setup, number=cou

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Jack Fearnley
On Fri, 23 Feb 2018 06:07:44 +1100, Chris Angelico wrote: > On Fri, Feb 23, 2018 at 3:00 AM, Steven D'Aprano > wrote: >> On Thu, 22 Feb 2018 12:03:09 +, bartc wrote: >>> Here's another speed-up I found myself, although it was only 50 times >>> faster, not 17,000: just write the code in C, and

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Chris Angelico
On Fri, Feb 23, 2018 at 3:00 AM, Steven D'Aprano wrote: > On Thu, 22 Feb 2018 12:03:09 +, bartc wrote: >> Here's another speed-up I found myself, although it was only 50 times >> faster, not 17,000: just write the code in C, and call it via >> os.system("fib.exe"). > > Did you include the time

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Chris Angelico
On Fri, Feb 23, 2018 at 2:15 AM, ast wrote: > Le 22/02/2018 à 13:03, bartc a écrit : >> >> On 22/02/2018 10:59, Steven D'Aprano wrote: >>> >>> >>> https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en >> >> >> While an interesting article on spee

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Chris Angelico
On Fri, Feb 23, 2018 at 12:51 AM, Serhiy Storchaka wrote: > 22.02.18 14:29, Chris Angelico пише: >> >> Not overly misleading; the point of it is to show how trivially easy >> it is to memoize a function in Python. For a fair comparison, I'd like >> to see the equivalent Julia code: the function, u

Re: atws

2018-02-22 Thread Chris Angelico
On Fri, Feb 23, 2018 at 2:06 AM, Larry Martell wrote: > On Thu, Feb 22, 2018 at 2:00 AM, Chris Angelico wrote: >> For reference, here's the version of requests that I have (which does >> have that exception available): >> > import requests > requests.__version__ >> '2.18.4' >> >> What's y

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread bartc
On 22/02/2018 16:00, Steven D'Aprano wrote: On Thu, 22 Feb 2018 12:03:09 +, bartc wrote: The idea of the Fibonacci benchmark is to test how effectively an implementation manages large numbers of recursive function calls. Then, fib(36) would normally involve 48,315,633 calls. This version d

Re: atws

2018-02-22 Thread Larry Martell
On Thu, Feb 22, 2018 at 10:25 AM, Mark Lawrence wrote: > On 22/02/18 15:06, Larry Martell wrote: >> >> On Thu, Feb 22, 2018 at 2:00 AM, Chris Angelico wrote: >>> >>> On Thu, Feb 22, 2018 at 5:27 PM, Larry Martell >>> wrote: I want to use the atws package (https://atws.readthedocs.

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Etienne Robillard
So, how exactly can PyPy and JIT runs multithreaded Python applications any faster than Julia on distributed systems? Right now I think PyPy and JIT can run Python code on my old ia32 computer faster than with Python/Cython. How do Julia scale on x86 machines ? Etienne Le 2018-02-22 à 11:0

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Ned Batchelder
On 2/22/18 11:00 AM, bartc wrote: On 22/02/2018 12:03, bartc wrote: On the fib(20) test, it suggests using this to get a 30,000 times speed-up: BTW while doing my tests, I found you could redefine the same function with no error: def fred(): pass def fred(): pass def fred():

Re: File opening modes (r, w, a ...)

2018-02-22 Thread Steven D'Aprano
On Thu, 22 Feb 2018 13:32:45 +0100, ast wrote: > Hello > > I share a very valuable table I found on StackOverflow about file > opening modes > > If like me you always forget the details of file opening mode, the > following table provides a good summary Thanks! -- Steve -- https://mail.py

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread bartc
On 22/02/2018 12:03, bartc wrote: On the fib(20) test, it suggests using this to get a 30,000 times speed-up: BTW while doing my tests, I found you could redefine the same function with no error: def fred(): pass def fred(): pass def fred(): pass For classes too.

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Steven D'Aprano
On Thu, 22 Feb 2018 12:03:09 +, bartc wrote: > The idea of the Fibonacci benchmark is to test how effectively an > implementation manages large numbers of recursive function calls. Then, > fib(36) would normally involve 48,315,633 calls. > > This version does only 37, giving a misleading impr

Re: atws

2018-02-22 Thread Mark Lawrence
On 22/02/18 15:06, Larry Martell wrote: On Thu, Feb 22, 2018 at 2:00 AM, Chris Angelico wrote: On Thu, Feb 22, 2018 at 5:27 PM, Larry Martell wrote: I want to use the atws package (https://atws.readthedocs.io/readme.html). I am using python 2.7.6 on ubuntu-trusty-64 3.13.0-87-generic. I get t

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Mark Lawrence
On 22/02/18 12:03, bartc wrote: It might be a technique to bear in mind, but it is nonsensical to say this gives a 17,000 times speed-up over the original code. What makes you say that? I have just run all of the code as given in the reference and get results that are in the same ball park

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread ast
Le 22/02/2018 à 13:03, bartc a écrit : On 22/02/2018 10:59, Steven D'Aprano wrote: https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en While an interesting article on speed-up techniques, that seems to miss the point of benchmarks. On t

ANN: Wing Python IDEs version 6.0.10 released

2018-02-22 Thread Wingware
Hi, We've just released Wing 6.0.10 , which adds support for Python 3.7 and the new breakpoint() builtin, improves reliability of remote development through network breaks, improves display of names for threads started with the threading module, fixes det

Re: atws

2018-02-22 Thread Larry Martell
On Thu, Feb 22, 2018 at 2:00 AM, Chris Angelico wrote: > On Thu, Feb 22, 2018 at 5:27 PM, Larry Martell > wrote: >> I want to use the atws package >> (https://atws.readthedocs.io/readme.html). I am using python 2.7.6 on >> ubuntu-trusty-64 3.13.0-87-generic. I get this error when importing >> th

Django-hotsauce 0.9.1 release

2018-02-22 Thread Etienne Robillard
Hi everyone, I'm glad to announce the release of Django-hotsauce 0.9.1: https://www.isotopesoftware.ca/pub/django-hotsauce/django-hotsauce-0.9.1.tar.gz This is primarly a bugfix release for PyPy. Users of django-hotsauce are encouraged to test this release (with PyPy or Python 3) and submit

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Serhiy Storchaka
22.02.18 14:29, Chris Angelico пише: Not overly misleading; the point of it is to show how trivially easy it is to memoize a function in Python. For a fair comparison, I'd like to see the equivalent Julia code: the function, unchanged, with something around the outside of it to manage caching and

File opening modes (r, w, a ...)

2018-02-22 Thread ast
Hello I share a very valuable table I found on StackOverflow about file opening modes If like me you always forget the details of file opening mode, the following table provides a good summary | r r+ w w+ a a+ --|-- read

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Chris Angelico
On Thu, Feb 22, 2018 at 11:03 PM, bartc wrote: > On 22/02/2018 10:59, Steven D'Aprano wrote: >> >> >> https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en > > > While an interesting article on speed-up techniques, that seems to miss the > point

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Rhodri James
On 22/02/18 10:59, Steven D'Aprano wrote: https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en Interesting article. I can't help but feel that using Cython is cheating a bit, and I was really expecting a bit more Pythonic rewriting of the

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread bartc
On 22/02/2018 10:59, Steven D'Aprano wrote: https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en While an interesting article on speed-up techniques, that seems to miss the point of benchmarks. On the fib(20) test, it suggests using this t

How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Steven D'Aprano
https://www.ibm.com/developerworks/community/blogs/jfp/entry/Python_Meets_Julia_Micro_Performance?lang=en -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing some floats in a file in an efficient way

2018-02-22 Thread ast
Le 21/02/2018 à 18:23, bartc a écrit : On 21/02/2018 15:54, ast wrote: Le 21/02/2018 à 15:02, bartc a écrit : On 21/02/2018 13:27, ast wrote: Time efficient or space efficient? space efficient If the latter, how many floats are we talking about? 10^9 Although it might be better