>>>>> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes:

  LT> Here is a plan to implement most of the needed bits.

  LT> # constant pi = 4 * atan2(1,1);

  LT> translates to

  LT> .sub anon_1 @IMMEDIATE, @ANON
  LT>      $N0 = atan 1.0, 1.0
  LT>      $P0 = new .Float
  LT>      $P0 = $N0
  LT>      .return ($P0)
  LT> .end

did you forget the 4 * part of the init value? and shouldn't atan2(1,1)
be (possibly) optimized to a constant or looked up in a table of easy
trig stuff and that value used? then you could just generate the
constant folded value of pi in the compiler and emit that float for the
init. if this gets compiled to bytecode this would really reduce the
runtime (even in BEGIN) to almost nothing.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to