Re: count2.asm



On Tue, 26 Jul 2005 11:44:12 -0400, Frank Kotler
<fbkotler@xxxxxxxxxxx> wrote:
>a\/b wrote:
>> On Mon, 25 Jul 2005 13:58:46 -0400, Frank Kotler
>>
>> this is my not tested one in C
>>
>> #include <stdio.h>
[etc]
[...]
>[The compiler can never win. If the compiler produces faster code, we
>use that. If the human produces faster code, we use that. The best the
>compiler can do is break even.]

Is it possible that one can do some C code that assembly people can
not do faster? (>0.1%) (i think yes, because i have seen that code)

>One minor nit to pick... You seem to have solved the "Y question" by not
>counting 'y's as either vowels or consonants - you've removed it from
>the "vowel strings" (upper and lower), but didn't add it to the
>"consonant strings". Easy to fix. I should fix that in my own code!

ok, ok here the vowels are "aeiou"

>Another thing I should probably fix... I don't have LF's CR's and tabs
>in my "punctuation string" - I *did* count them as punctuation in the
>first version. I don't really know which is "right" here...

lf cr are 10 13?
If the file is read in "text form" seems to me "\n"==10, 13 or 13,10 i
don't remember; in the "binary form" "\n"==10

>Nice job! Thanks!

it is buggy, i had no time for it because i had to go in my city for
doing many things. You have not "thanks" to me because
1) it is C not assembly
2) because if 'o' is signed char (if char==signed char) then "list[o]"
(seems to me) can read memory out of "list" (if o<0)

but i have an hart of troll!!!! :-)
.



Relevant Pages

  • Re: STM32 ARM toolset advice?
    ... Compulsory car comparison: would you buy a car where the motor block is ... you yourself using a self-help book) can fix? ... compilers work better than a compiler vendor. ...
    (comp.arch.embedded)
  • Re: How many bytes per Italian character?
    ... There's a reason I don't use free open-source products: ... someone once said "Well, you should use gcc because that way, if you find a bug ... I used to work for a compiler company. ... *know* how hard it is to fix bugs in optimizing compilers. ...
    (microsoft.public.vc.mfc)
  • Re: Heres a good one...
    ... Fix it, recompile and follow ... Always look at the earliest diagnostic reported by the compiler. ... Anything following a syntax error can probably be ignored; ... Error messages up to and including the first reported syntax error are ...
    (comp.lang.c)
  • Re: "no variable or argument declarations are necessary."
    ... > say I write some Python code, using assert to validate datatypes. ... I fix the first error, ... I can often run 4 Python edit-debug cycles in the time it takes me to ... I'll spend more time making the compiler happy than the ...
    (comp.lang.python)
  • Re: size_t problems
    ... You really should bite the bullet and fix the code. ... Believe me, I know what porting means, what is important in code ... software package supplied by the vender is *full* of pre C89 crud. ... The compiler would yell at me. ...
    (comp.lang.c)