Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
(Aug-16-2019, 08:52 PM)Gribouillis Wrote: I managed to get a similar performance in python 3 by using a temporary list to store a row of pixels. It seems that the problem indeed comes from the repea... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-18-2019, 05:19 AM |
|
|
Thread: The best Programming books?
Post: RE: The best Programming books?
And then there is Zen and The Art of Motorcycle Maintenance. Very good on debugging. |
|
RMJFlack |
Bar |
38 |
456,688 |
Aug-17-2019, 09:37 AM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
Whereas the same (catenation) algorithm using char strings is also very much faster and roughly linear.
It looks like the bytes catenation switches to a very poor algorithm when the string size gets... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 09:01 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
So Ive had a first step at using numpy. Code is below, Im sure its rather crude and any critique is very welcome.
The time 'signature' in terms of total run time for various n (to give a nxn image) i... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 08:34 PM |
|
|
Thread: Programmer named Tim...
Post: RE: Programmer named Tim...
Fair enough! Any umm guilty as charged. :)
Im probably over sensitive as I am actually working with a programmer named Tim!
Dashing towards Silly Frenchman ...
Thanks for the help. |
|
RMJFlack |
Board |
11 |
10,060 |
Aug-16-2019, 05:23 PM |
|
|
Thread: Programmer named Tim...
Post: RE: Programmer named Tim...
(Aug-16-2019, 04:34 PM)metulburr Wrote: explanations for user titles are here.Yes I read that. My post was after reading that. I'm not entirely sure visitors to this site would go there right away... |
|
RMJFlack |
Board |
11 |
10,060 |
Aug-16-2019, 04:47 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
(Aug-16-2019, 01:38 PM)ThomasL Wrote: Do you know Numpy?
An images can be represented as an array of values.
I actually don´t understand why you are building a bmp with strings / bytes / bytestrings... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 04:14 PM |
|
|
Thread: Programmer named Tim...
Post: RE: Programmer named Tim...
I'm guessing this will go over the heads of a lot of people. Well me anyway!
I actually wasted a fair bit of time trying to figure out how to change it.
I was slightly concerned as on some work relat... |
|
RMJFlack |
Board |
11 |
10,060 |
Aug-16-2019, 04:01 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
Numpy: Vaguely aware, not familiar.
Why strings? The bad answer is simply because that’s how it is done in the code I found when I searched on how to write a bmp file.
Sounds like I should che... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 01:59 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
There is some extraneous (to this issue ) code , for bmp headers etc. Should I post the whole thing warts and all, or crunch it down to essentially the code fragment I gave? |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 01:53 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: RE: Byte string catenation inefficient in 3.7?
Seems low on an 8 GB Ram machine. Unless there is some parameter limiting the amount of memory used. (I did check there was no paging activity, it occurred to me that possibly byte strings have some... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 01:15 PM |
|
|
Thread: Byte string catenation inefficient in 3.7?
Post: Byte string catenation inefficient in 3.7?
I'm noticing something odd with byte string catenation versus text string.
Im building a bmp file. The core code is (ignoring row padding and headers etc)
for Y in range(0, XY[1]): # (BMPs are L to ... |
|
RMJFlack |
General Coding Help |
13 |
5,855 |
Aug-16-2019, 07:32 AM |
|
|
Thread: Why is Python so hard to maintain
Post: RE: Why is Python so hard to maintain
(Aug-15-2019, 07:04 PM)buran Wrote: can you provide minimal example with sample data so we can see what expected output(i.e. from python2)
I will try too. (Have to make a cut down version of the fu... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 10:30 PM |
|
|
Thread: Why is Python so hard to maintain
Post: RE: Why is Python so hard to maintain
(Aug-15-2019, 05:01 PM)buran Wrote: (Aug-15-2019, 04:16 PM)RMJFlack Wrote: BUT in Python 3.7, struct.pack is changed to byte type from string, and I'm having a real tough time trying to fix the co... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 05:48 PM |
|
|
Thread: Why is Python so hard to maintain
Post: RE: Why is Python so hard to maintain
Ok, executive summary of the current problem (I should probably post separate specific threads) but ...
I have a Python 3.3 script (about 4 years old) that creates a bmp file from data (a sort of con... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 04:16 PM |
|
|
Thread: Why is Python so hard to maintain
Post: RE: Why is Python so hard to maintain
(Aug-15-2019, 03:33 PM)metulburr Wrote: (Aug-15-2019, 03:08 PM)RMJFlack Wrote: redefining the type of the result of a library function between versions (struct.pack for example). very uncool.One c... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 03:42 PM |
|
|
Thread: Why is Python so hard to maintain
Post: RE: Why is Python so hard to maintain
Ease of use?
"I know it when I see it" **biggrin**
Things like transparency, things "just work", intuitiveness, clear documentation that doesn't require a degree in CS, clear diagnostics.
Zero tim... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 03:08 PM |
|
|
Thread: Why is Python so hard to maintain
Post: Why is Python so hard to maintain
Computer systems, applications, languages etc evolve. There are updates. That is fine. But Python seems to have a core competence in backwards INcompatability. I’m wondering why that is.
So that ... |
|
RMJFlack |
News and Discussions |
15 |
6,635 |
Aug-15-2019, 02:33 PM |
|
|
Thread: Install of Pillow fails
Post: RE: Install of Pillow fails
With a few false starts and some blind fiddling this now works. Thank you!
I did have to brute force edit the system path to get it to "see" PIL and also fudge IDLE to run Python37. Is there a goo... |
|
RMJFlack |
General Coding Help |
4 |
9,259 |
Jan-28-2019, 06:10 AM |
|
|
Thread: Install of Pillow fails
Post: RE: Install of Pillow fails
Thanks, I will try this. I wasn’t aware it was so finicky on versions.
[On a philosophical aside I do find it somewhat awkward that I seem to need multiple versions of Python. Maybe I can move my ... |
|
RMJFlack |
General Coding Help |
4 |
9,259 |
Jan-28-2019, 02:48 AM |