<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="changes" page="intro" subpage="bytecode-94"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Bytecode generation</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Bytecode generation"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Bytecode generation</h1>
      <p>Saxon-EE 9.4 selectively compiles stylesheets and queries into Java bytecode before execution.</p>
      <p>This change should be largely invisible to users, apart from the performance gain, which in typical cases is around 25%.</p>
      <p>Where Saxon decides that generating bytecode would be advantageous, the bytecode is generated as the final stage
        in the query or stylesheet compilation process. The bytecode is held in memory (never written out to disk) as part of the
        expression tree. Interpreted expressions can call compiled expressions, and vice versa.</p>
      <p>Bytecode generation is done using the ASM library, which is included as an integral part of the Saxon-EE JAR file.</p>
      <p>Bytecode generation occurs even in the .NET version of the product. The bytecode is automatically and dynamically
        converted to .NET IL code prior to execution, by the IKVM runtime.</p>
      <p>There are several configuration options associated with bytecode generation. The option <code>GENERATE_BYTE_CODE</code>
        can be set to <code>false</code> to disable byte code generation (which might be useful, for example, when doing low-level
        debugging). The option <code>DEBUG_BYTE_CODE</code> can be set to cause the generated byte code to contain debugging
        information. And the option <code>DISPLAY_BYTE_CODE</code> can be set to cause the generated code to be displayed
        (on the standard error output).</p>
      <p>The facility to generate byte code replaces the facility in Saxon 9.3 to generate Java source code (which was available
        for XQuery only). It also replaces the XSLT facility for "compiled stylesheets".</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="sourcedocs-94.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>