Re: C / asm / long ints




fermineutron wrote:
A while back i tried to calculate factorials of large numbers using
arrays in C, the array encoded integer arithemetic that i wrote in C
was very slow, it would take almost a second to multiply 2 array
encoded integers. resently i looked at large precision libraries for C,
in particular GMP but i was unable to get it to run with my compiler,
aperantly some header files were not found. I was curious what is the
best way to interface C and asm so that i could write simmilar library
in asm and use it in C.

Some compilers support embedded asm but it is waste of time unless you
understand the underlined processor architecture, its related
instruction set, how your compiler generates the corresponding asm for
your optimized C routine and so on. It is big time investment.
Relatively, less time consuming method with appreciable return is to
optimize the C routine itself; and there are various techinques to do
so which are easily available on the net and also in some previous
threads in this group.

-Nishu

.



Relevant Pages

  • Re: C / asm / long ints
    ... arrays in C, the array encoded integer arithemetic that i wrote in C ... The problem for you is that the C optimizer can take full advantage of ... switch from, say GCC, to a compiler which is known for more efficient ...
    (comp.lang.c)
  • Re: C / asm / long ints
    ... arrays in C, the array encoded integer arithemetic that i wrote in C ... in asm and use it in C. ... It would probably be easier to figure out how to make GMP ...
    (comp.lang.c)
  • C / asm / long ints
    ... arrays in C, the array encoded integer arithemetic that i wrote in C ... resently i looked at large precision libraries for C, ... in asm and use it in C. ...
    (comp.lang.c)
  • Re: Idea for ECMA/C# Standard - compile time hash for performance
    ... I agree with you the chance of a compiler change is slim, ... and then delegating to the standard hash for fields accessed less frequently. ... or the array lookup which would require the ... > 64-bit architecture) for each enum value that doesn't map to anything. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Q: Checking the size of a non-allocated array?
    ... an actual argument is already invalid ... First note that you don't have an unallocated array in the subroutine. ... it is comparable to disassociated or undefined pointers. ... Obviously the compiler has ...
    (comp.lang.fortran)