Prev: MAKE UPTO $5000 PER MONTH! $2000 IN FIRST 30 DAYS!
Next: introducing Lettuce, BDD tool for python with Django integration
From: DivX on 20 Jun 2010 06:19 On 20 lip, 02:52, Steven D'Aprano <st...(a)REMOVE-THIS- cybersource.com.au> wrote: > On Sat, 19 Jun 2010 13:36:57 -0700, DivX wrote: > > On 19 lip, 21:18, geremy condra <debat...(a)gmail.com> wrote: > >> On Sat, Jun 19, 2010 at 11:53 AM, DivX <sem.r...(a)gmail.com> wrote: > >> > I found on the forum some discussion about crypting text and one guy > >> > did make assembly implementation of crypting algorithm. He > >> > dynamically generates mashine code and call that from python. Here > >> > are impressive > >> > resultshttp://www.daniweb.com/code/snippet216632-5.html > > >> > Is this better approach then writing extensions in c? > > >> No, xor cipher is not suitable for general purpose encryption, and what > >> do you need the speed for? xor is almost certainly not going to be the > >> bottleneck in your application. > > >> Geremy Condra > > > Just asking if this approach is good for example quicksort algoriths or > > some kind of sorting algorithms, or simulations but the point is of > > mixing python and assembler? > > Ask yourself, why aren't programs written in assembly if it's so good? > > (1) It's platform dependent. Do you really need a separate program for > every single hardware platform you want to run Quicksort on? > > (2) Writing assembler is hard, really hard. And even harder to debug. > > (3) Modern C compilers can produce better (faster, more efficient) > machine code than the best assembly code written by hand. > > Honestly, this question has been resolved twenty years ago -- thirty > years ago, maybe there was still a good point in writing general purpose > code in assembly, but now? It's just showing off. Unless you're writing > hardware specific code (e.g. device drivers) it is pointless, in my > opinion. > > I think that mixing assembly and python is a gimmick of very little > practical significance. If you really need the extra performance, check > out PyPy, Cython, Pyrex and Psyco. > > -- > Steven I can agree with you about most of the arguments, but why he continues to developing it. What he sees and we do not see? If you're interested I found a link http://www.tahir007.com/
From: Steven D'Aprano on 20 Jun 2010 06:46 On Sun, 20 Jun 2010 03:19:48 -0700, DivX wrote: > On 20 lip, 02:52, Steven D'Aprano <st...(a)REMOVE-THIS- > cybersource.com.au> wrote: [...] >> I think that mixing assembly and python is a gimmick of very little >> practical significance. If you really need the extra performance, check >> out PyPy, Cython, Pyrex and Psyco. >> >> -- >> Steven > > I can agree with you about most of the arguments, but why he continues > to developing it. What he sees and we do not see? Why ask us? You should ask him. -- Steven
From: DivX on 20 Jun 2010 06:57 On 20 lip, 12:46, Steven D'Aprano <st...(a)REMOVE-THIS- cybersource.com.au> wrote: > On Sun, 20 Jun 2010 03:19:48 -0700, DivX wrote: > > On 20 lip, 02:52, Steven D'Aprano <st...(a)REMOVE-THIS- > > cybersource.com.au> wrote: > [...] > >> I think that mixing assembly and python is a gimmick of very little > >> practical significance. If you really need the extra performance, check > >> out PyPy, Cython, Pyrex and Psyco. > > >> -- > >> Steven > > > I can agree with you about most of the arguments, but why he continues > > to developing it. What he sees and we do not see? > > Why ask us? You should ask him. > > -- > Steven Be sure I will ask him, but before, I wanted to know your opinions about it. Hear arguments on both sides...
From: Lie Ryan on 20 Jun 2010 12:41 On 06/20/10 20:57, DivX wrote: > On 20 lip, 12:46, Steven D'Aprano <st...(a)REMOVE-THIS- > cybersource.com.au> wrote: >> On Sun, 20 Jun 2010 03:19:48 -0700, DivX wrote: >>> On 20 lip, 02:52, Steven D'Aprano <st...(a)REMOVE-THIS- >>> cybersource.com.au> wrote: >> [...] >>>> I think that mixing assembly and python is a gimmick of very little >>>> practical significance. If you really need the extra performance, check >>>> out PyPy, Cython, Pyrex and Psyco. >> >>>> -- >>>> Steven >> >>> I can agree with you about most of the arguments, but why he continues >>> to developing it. What he sees and we do not see? >> >> Why ask us? You should ask him. >> >> -- >> Steven > > Be sure I will ask him, but before, I wanted to know your opinions > about it. Hear arguments on both sides... Ever heard of JIT?
From: Terry Reedy on 20 Jun 2010 13:36 On 6/20/2010 12:41 PM, Lie Ryan wrote: > On 06/20/10 20:57, DivX wrote: >> On 20 lip, 12:46, Steven D'Aprano<st...(a)REMOVE-THIS- >> cybersource.com.au> wrote: >>> On Sun, 20 Jun 2010 03:19:48 -0700, DivX wrote: >>>> On 20 lip, 02:52, Steven D'Aprano<st...(a)REMOVE-THIS- >>>> cybersource.com.au> wrote: >>> [...] >>>>> I think that mixing assembly and python is a gimmick of very little >>>>> practical significance. If you really need the extra performance, check >>>>> out PyPy, Cython, Pyrex and Psyco. Of course, Psyco mixes assembly and python, which is why it was originally (not sure now) limited to x86 machines. It does do generically, in small chunks, behind the scenes, so the rest of us can get the benefit without expert assembly knowledge. >>>> I can agree with you about most of the arguments, but why he continues >>>> to developing it. I presume because he can and enjoys it. That sort of tinkering is what led to Psyco. > Ever heard of JIT? Psyco is one form of JIT. You might enjoy reading about how it works. Terry Jan Reedy
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: MAKE UPTO $5000 PER MONTH! $2000 IN FIRST 30 DAYS! Next: introducing Lettuce, BDD tool for python with Django integration |