Thanks for the responses, I have seen Math::Integer before and have played with it.

I have heavily profiled the code with NYTProf making improvements here and there for the last few months with a major rewrite the other day. The slow part is the math, mainly one nasty do { } while ( ) construct. I think that I've reached the limit of what I can optimize, this implementation is already a heavily optimized / rewrite of another algorithm, and my question was a long shot and curiosity. Normally, I wouldn't really bother optimizing it since it is "fast enough", but it's been a slow week at work lol. Yeah, I'll probably try an Inline::C implementation before a true C rewrite when the free time comes to do it.

I do think it would be interesting if we could have access to strongly typing all the variable types in C when we need it, and the more easy to work with standard Perl types the rest of the time.


In reply to Re^2: Anyway to Have Strong-Like Typing by jmmitc06
in thread Anyway to Have Strong-Like Typing by jmmitc06

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.