Received: from smtp.mana.pf (IDENT:mail@smtp.mana.pf [202.3.225.102]) by hub.org (8.10.1/8.10.1) with ESMTP id e5SGC7151322 for ; Wed, 28 Jun 2000 12:12:08 -0400 (EDT) Received: from hina.esoft.pf (d1-046.sl.mana.pf [202.3.226.46]) by smtp.mana.pf (8.9.3/8.9.3) with ESMTP id RAA07167 for ; Wed, 28 Jun 2000 17:13:02 -1000 Received: (qmail 3770 invoked from network); 27 Jun 2000 23:53:28 -0000 Received: from hina.esoft.pf (HELO esoft.pf) (jdg@192.168.10.2) by hina.esoft.pf with SMTP; 27 Jun 2000 23:53:28 -0000 Message-ID: <39593E78.F113B0A6@esoft.pf> Date: Tue, 27 Jun 2000 13:53:28 -1000 From: Jean-Denis Girard Organization: Essential Software X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.14 i586) X-Accept-Language: fr, en MIME-Version: 1.0 To: "pgsql-interfaces@postgresql.org" Subject: Overhead of Pl/Perl ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200006/121 I would like to know what is the overhead of using Perl versus C in terms of memory consumption, speed... I'm storing usernames / encrypted passords in a table and wrote this ridiculous Pl/Perl function: CREATE FUNCTION "crypt" (text,text ) RETURNS bool AS 'return (crypt($_[0],$_[1]) eq $_[1]) ? 1:0;' LANGUAGE 'plperl' in order to do things like: select * from users where name='foo' and crypt(passwd, 'bar') This is the only stored procedure I use in the database. Is there any real life benefit in rewriting the function in C, and loosing the simplicity of Perl ? Thanks, Jean-Denis Girard