On Thu, 18 Dec 2008 05:51:33 -0800, Emanuele D'Arrigo wrote:
> I've written the code below to test the differences in performance
...
> ## TIMED FUNCTIONS
> startTime = time.clock()
> for i in range(0, numberOfRuns):
> re.match(pattern, longMessage)
> patternMatchingTime = time.clock() - start
Emanuele D'Arrigo wrote:
> I've written the code below to test the differences in performance
> between compiled and non-compiled regular expression matching but I
> don't quite understand the results. It appears that the compiled the
> pattern only takes 2% less time to process the match. Is ther
Emanuele D'Arrigo wrote:
> I've written the code below to test the differences in performance
> between compiled and non-compiled regular expression matching but I
> don't quite understand the results. It appears that the compiled the
> pattern only takes 2% less time to process the match. Is the
Emanuele D'Arrigo wrote:
> Sorry for the previous post, hit the Enter button by mistake... here's
> the complete one:
>
> Hi everybody!
>
> I've written the code below to test the differences in performance
> between compiled and non-compiled regular expression matching but I
> don't quite under
Emanuele D'Arrigo wrote:
Sorry for the previous post, hit the Enter button by mistake... here's
the complete one:
Hi everybody!
I've written the code below to test the differences in performance
between compiled and non-compiled regular expression matching but I
don't quite understand the resul
Sorry for the previous post, hit the Enter button by mistake... here's
the complete one:
Hi everybody!
I've written the code below to test the differences in performance
between compiled and non-compiled regular expression matching but I
don't quite understand the results. It appears that the com
Hi everybody!
I've written the code below to test the differences in performance
between compiled and non-compiled regular expression matching but I
don't quite understand the results. It appears that the performance
difference is only around 2%, even if I run the
import re
import
Jeff <[EMAIL PROTECTED]>:
> (and possibly intermediate results)
These could be stored purely in C space, without refcounting needed.
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
--
http://mail.python.org/mailman/listinfo/python-list
> However, I assumed that calls to (thread safe) C Library functions
> release the global interpreter lock.
This is mainly applicable to external C libraries. The interface to
them may not be thread-safe; anything that uses the Python API to
create/manage Python objects will require use of the GI
Hi
Ok, if I understand between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS
is not possible use a C/Python api functions ?
Sorry, but when thread enter another time with Py_END_ALLOW_THREADS this
thread enter to competition to lock GIL ?
Thks
Thks
On Thu, Jun 26, 2008 at 12:16 PM, Matthieu
Hi,
The C-API uses references counts as well, so it is not threadsafe.
Matthieu
2008/6/26 Pau Freixes <[EMAIL PROTECTED]>:
> But Python C-API[1] it's the main base for extent python with C/c++, and
> this is not not threadsafe.? I dont understand
>
> [1] http://docs.python.org/api/api.html
>
> O
But Python C-API[1] it's the main base for extent python with C/c++, and
this is not not threadsafe.? I dont understand
[1] http://docs.python.org/api/api.html
On Thu, Jun 26, 2008 at 4:49 AM, Benjamin <[EMAIL PROTECTED]>
wrote:
> On Jun 25, 9:05 am, Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
> >
On Jun 25, 9:05 am, Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
>
> 1) Is there a reason for this?
I think it is because the Python re library uses the Python C-API
which is not threadsafe.
> 2) Is the regex library not thread-safe?
> 3) Is it possible, to release the GIL in re.match() to
> get m
In article <[EMAIL PROTECTED]>,
Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
>
>I understand that the C implementation of Python use a global interpreter
>lock to avoid problems, so doing CPU bound tasks in multiple threads
>will not result in better performance on multi-CPU systems.
>
>However, I as
Hi all
I understand that the C implementation of Python use a global interpreter
lock to avoid problems, so doing CPU bound tasks in multiple threads
will not result in better performance on multi-CPU systems.
However, I assumed that calls to (thread safe) C Library functions
release the global i
15 matches
Mail list logo