Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-13 Thread chromatic
On Thursday 02 October 2008 07:35:09 NotFound wrote: I think will be better the other way, using the return value to flag existence, and passing a pointer to store the result. This will allow shorter and cleaner code. A 5% improvement in some subsystems is nice, but nothing else uses out

[perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread via RT
# New Ticket Created by Nick Glencross # Please include the string: [perl #59546] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59546 Hi All, This patch adds two new opcodes which allow a hash exists and get to be

Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread Nick Glencross
All, Sorry, I see that I said opcode a new times, when of course I meant PMC vtable entry. Nick

Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread NotFound
I think will be better the other way, using the return value to flag existence, and passing a pointer to store the result. This will allow shorter and cleaner code. -- Salu2

Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread Nick Glencross
NotFound, That would look cleaner, wouldn't it? I'll give it a go. Nick On Thu, Oct 2, 2008 at 3:35 PM, NotFound [EMAIL PROTECTED] wrote: I think will be better the other way, using the return value to flag existence, and passing a pointer to store the result. This will allow shorter and

Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread Patrick R. Michaud
On Thu, Oct 02, 2008 at 04:51:32PM +0100, Nick Glencross wrote: NotFound, That would look cleaner, wouldn't it? I'll give it a go. Nick On Thu, Oct 2, 2008 at 3:35 PM, NotFound [EMAIL PROTECTED] wrote: I think will be better the other way, using the return value to flag existence,

Re: [perl #59546] [PATCH] Combine hash exists/get into a new opcode (5% performance gain)

2008-10-02 Thread NotFound
I think will be better the other way, using the return value to flag existence, and passing a pointer to store the result. This will allow shorter and cleaner code. Another possibility might be to avoid the extra parameter altogether, returning NULL (not PMCNULL) if the element doesn't