Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-02-03 Thread Tim Bunce
On Wed, Feb 02, 2011 at 12:10:59PM -0500, Andrew Dunstan wrote: > > On 02/02/2011 11:45 AM, Tim Bunce wrote: > >>But why are we bothering to keep $prolog at > >>all any more, if all we're going to pass it is&PL_sv_no all the > >>time? Maybe we'll have a use for it in the future, but right now we >

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-02-02 Thread Andrew Dunstan
On 02/02/2011 11:45 AM, Tim Bunce wrote: But why are we bothering to keep $prolog at all any more, if all we're going to pass it is&PL_sv_no all the time? Maybe we'll have a use for it in the future, but right now we don't appear to unless I'm missing something. PostgreSQL::PLPerl::NYTProf wou

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-02-02 Thread Tim Bunce
On Mon, Jan 31, 2011 at 02:22:37PM -0500, Andrew Dunstan wrote: > > > On 01/15/2011 12:31 AM, Alex Hunsaker wrote: > >On Tue, Dec 7, 2010 at 07:24, Tim Bunce wrote: > >>Changes: > >> > >>Sets the local $_TD via C instead of passing an extra argument. > >>So functions no longer start with

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-02-01 Thread Alex Hunsaker
On Mon, Jan 31, 2011 at 12:22, Andrew Dunstan wrote: > This looks pretty good. But why are we bothering to keep $prolog at all any > more, if all we're going to pass it is &PL_sv_no all the time? Maybe we'll > have a use for it in the future, but right now we don't appear to unless I'm > missing

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-01-31 Thread Andrew Dunstan
On 01/15/2011 12:31 AM, Alex Hunsaker wrote: On Tue, Dec 7, 2010 at 07:24, Tim Bunce wrote: Changes: Sets the local $_TD via C instead of passing an extra argument. So functions no longer start with "our $_TD; local $_TD = shift;" Pre-extend stack for trigger arguments for sligh

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2011-01-14 Thread Alex Hunsaker
On Tue, Dec 7, 2010 at 07:24, Tim Bunce wrote: > Changes: > >    Sets the local $_TD via C instead of passing an extra argument. >    So functions no longer start with "our $_TD; local $_TD = shift;" > >    Pre-extend stack for trigger arguments for slight performance gain. > > Passes installcheck

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 09:42 AM, Alexey Klyukin wrote: I used to work on a patch that converts postgres arrays into perl array references: http://archives.postgresql.org/pgsql-hackers/2009-11/msg01552.php I have a newer patch, which is, however, limited to one-dimensional resulting arrays. If there's

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-13 Thread Alexey Klyukin
On Dec 9, 2010, at 7:32 PM, Tim Bunce wrote: > On Wed, Dec 08, 2010 at 09:21:05AM -0800, David E. Wheeler wrote: >> On Dec 8, 2010, at 9:14 AM, Tim Bunce wrote: >> Do you have any more improvements in the pipeline? >>> >>> I'd like to add $arrayref = decode_array_literal('{2,3}') and >>> m

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-09 Thread Tim Bunce
On Wed, Dec 08, 2010 at 09:21:05AM -0800, David E. Wheeler wrote: > On Dec 8, 2010, at 9:14 AM, Tim Bunce wrote: > > >> Do you have any more improvements in the pipeline? > > > > I'd like to add $arrayref = decode_array_literal('{2,3}') and > > maybe $hashref = decode_hstore_literal('x=>1, y=>2')

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-08 Thread David E. Wheeler
On Dec 8, 2010, at 9:14 AM, Tim Bunce wrote: >> Do you have any more improvements in the pipeline? > > I'd like to add $arrayref = decode_array_literal('{2,3}') and > maybe $hashref = decode_hstore_literal('x=>1, y=>2'). > I don't know how much works would be involved in those though. Those woul

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-08 Thread Tim Bunce
On Tue, Dec 07, 2010 at 10:00:28AM -0500, Andrew Dunstan wrote: > > > On 12/07/2010 09:24 AM, Tim Bunce wrote: > >Changes: > > > > Sets the local $_TD via C instead of passing an extra argument. > > So functions no longer start with "our $_TD; local $_TD = shift;" > > > > Pre-extend s

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-07 Thread Andrew Dunstan
On 12/07/2010 09:24 AM, Tim Bunce wrote: Changes: Sets the local $_TD via C instead of passing an extra argument. So functions no longer start with "our $_TD; local $_TD = shift;" Pre-extend stack for trigger arguments for slight performance gain. Passes installcheck. Pleas

[HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-07 Thread Tim Bunce
Changes: Sets the local $_TD via C instead of passing an extra argument. So functions no longer start with "our $_TD; local $_TD = shift;" Pre-extend stack for trigger arguments for slight performance gain. Passes installcheck. Tim. diff --git a/src/pl/plperl/plperl.c b/src/pl/plper