home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,919 of 2,978   
   Dr John Stockton to All   
   Re: Decoding RNA codons: fastest method    
   11 Oct 05 14:09:23   
   
   From: jrs@merlyn.demon.co.uk   
      
   JRS:  In article <06ilk19rqq993nnqnjqg8l60a1tp835p66@4ax.com>, dated   
   Mon, 10 Oct 2005 22:02:10, seen in news:comp.lang.pascal.borland, Bart   
    posted :   
   >[snip]   
   >>It looks like Delphi; I don't recall Return in Pascal.   
   >Yep, I recoded it in Delphi, my TP6 won't run under WinME on my   
   >machine...   
   >   
   >>This should be   
   >>quicker, and gives the same but with a leading 3.   
   >>   
   >>        function CodonHash(const ACodon: tCodon): Longint;   
   >>        begin CodonHash := Longint(ACodon) end;   
   >Tried that: it gives me a compile error: invalid typecast   
      
   That's the penalty for speaking Delphi in a Pascal group.  For anything   
   involving strings, Delphi optimisation will be quite different from   
   Pascal optimisation, except (?) if you use type shortstring in a Delphi   
   early enough to handle them directly rather than through conversion to   
   some other type.   
      
      
   >Tried move(ACodon,Result,3) --> gives same result (as expected) but is   
   >slower.   
      
   Move will be slower (for short items) because of parameter-handling; and   
   3 bytes is not a convenient size, 4-byte aligned units being better.   
      
   You might do better to express your codons as 4-character strings such   
   as ' UUU' or as array [0..3] of char - or you might do worse.   
      
      
   --   
    © John Stockton, Surrey, UK.  ?@merlyn.demon.co.uk   Turnpike v4.00   MIME. ©   
      TP/BP/Delphi/&c., FAQqy topics & links;   
        RAH Prins : c.l.p.b mFAQ;   
      Timo Salmi's Turbo Pascal FAQ.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca