The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

<!--  Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->

<HTML>
<HEAD>

<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
 <TITLE>Sling less for speed</TITLE> 
</HEAD>

<BODY     >

<CENTER>
<TABLE WIDTH=100%> 
     <TR> <TD WIDTH=100% ALIGN=CENTER>
         <A HREF="sld001.htm">First</A>&nbsp;&nbsp;
         <A HREF="sld017.htm">Previous</A>&nbsp;&nbsp;
         <A HREF="sld019.htm">Next</A>&nbsp;&nbsp;
         <A HREF="sld093.htm">Last</A>&nbsp;&nbsp;
&nbsp;&nbsp;         <A HREF="index.htm">Index</A>&nbsp;&nbsp;
         <A HREF="dbi.perl.org">Home</A>&nbsp;&nbsp;
         <A HREF="tsld018.htm">Text</A>&nbsp;&nbsp;
     </TD> </TR>
     <TR> <TD WIDTH=100% ALIGN=CENTER>
         <IMG SRC="img018.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
     </TD> </TR>
</TABLE>
<P>Slide 18 of 93</P>
</CENTER>
<!-- <UL>
<H2>Sling less for speed</H2>
</UL></P>
<P><UL>
<LI><H2>while(@row = $sth-&#062fetchrow_array) { … }
</H2>
<UL>
<LI>one field:   3,100 fetches per cpu second
<LI>ten fields:  1,000 fetches per cpu second
</UL></UL><UL>
<H2>
</H2>
</UL><UL>
<LI><H2>while($row = $sth-&#062fetchrow_arrayref) { … }
</H2>
<UL>
<LI>one field:   5,300 fetches per cpu second
<LI>ten fields:  4,000 fetches per cpu second 
</UL></UL><UL>
<H2>
</H2>
</UL><UL>
<LI><H2>Notes:
</H2>
<UL>
<LI>Timings made on an old SPARC 10 using DBD::Oracle
<LI>Timings assume instant record fetch within driver
<LI>Fields all just one char. @row would be even slower for more/bigger fields
<LI>Use bind_columns() for direct access to fetched fields without copying
</UL></UL></P>
<P>  -->
</Body>
</HTML>