Re: Create new instance of Python class in C

2005-09-10 Thread Sybren Stuvel
phil hunt enlightened us with: > Why do you need to maske lots of copies? The puzzles are stored in a NxN list of strings. The strings contain all the numerals that that block can contain. So a 9x9 puzzle contains 81 strings "123456789" when it's "empty". My creation function picks a block that i

Re: Create new instance of Python class in C

2005-09-09 Thread phil hunt
On Fri, 9 Sep 2005 18:50:26 +0200, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >djw enlightened us with: >> Personally, I would try Psyco first, and consider Pyrex next. > >Ok, I'll take a look at those. > >> Are you sure your algorithm can't be optimized first, before you >> start trying to write thi

Re: Create new instance of Python class in C

2005-09-09 Thread phil hunt
On Fri, 9 Sep 2005 17:19:21 +0200, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >Hi people, > >I'm creating a program that can solve and create Sudoku puzzles. My >creation function needs to make a lot of copies of a puzzle. Why do you need to maske lots of copies? And when you say "lots of" what numb

Re: Create new instance of Python class in C

2005-09-09 Thread Sybren Stuvel
djw enlightened us with: > Personally, I would try Psyco first, and consider Pyrex next. Ok, I'll take a look at those. > Are you sure your algorithm can't be optimized first, before you > start trying to write this in C? I'm sure there will be optimizations, but profiling showed that the copyin

Re: Create new instance of Python class in C

2005-09-09 Thread djw
Sybren Stuvel wrote: > Hi people, > > I'm creating a program that can solve and create Sudoku puzzles. My > creation function needs to make a lot of copies of a puzzle. Until > now, I used copy.deepcopy(), but that's too slow. I want to implement > such a copying function in C and use that instead

Create new instance of Python class in C

2005-09-09 Thread Sybren Stuvel
Hi people, I'm creating a program that can solve and create Sudoku puzzles. My creation function needs to make a lot of copies of a puzzle. Until now, I used copy.deepcopy(), but that's too slow. I want to implement such a copying function in C and use that instead. My idea about this is: - Get t