Re: How do coders handle 16-bit numbers?



I think I'm going to stick with what I've got. I've already started
writing a large piece of code which calls this subroutine and it seems
to work well. I have to admit I do not fully understand how the
routine works. I'd have to sit down with an abacus or something and
shift bits around before I could see how it actually works. but from
what I can see the max number of loops for the routine is 17. That
still eats some CPU time, but not as bad as making a loop which adds
the number to itself over and over, which is what I was doing before.

However, if somebody understands the routine and could tell me how to
optimize it for smaller numbers, that would be cool. Really I do not
need a 32-bit result. I only need a 16-bit result.

.



Relevant Pages

  • Re: contributing to perl
    ... BTW, is there a way to add to existing modules instead of creating a new one. ... the routine I am writing might fit perfectly in math module. ... > Write a module which includes that subroutine and contribute it to ...
    (perl.beginners)
  • Re: Fast pancake flipping
    ... excerpt of my fast flipper here. ... Recently I wrote a subroutine that seemed to qualify for the ... It is certainly true that making a routine readable is usually ...
    (comp.programming)
  • Counter Intuitive Results: Optimising an FFT routine for Speed
    ... FFT routine, and at the last stage I find that where the biggest gains ... FFT_NRC starting to execute 5000 loops ... FFT_NRC_prev starting to execute 5000 loops ...
    (comp.lang.c)
  • Re: Learning Fortran
    ... The main code has several subroutine calls and by my quick flowchart-check the calls go five deep at a max. ... the implementation *and* the algorithm. ... Somebody who knows a little about the filter design procedure ... called when a low-pass spec is issued to the routine.) ...
    (comp.soft-sys.matlab)
  • Re: What routine is running
    ... argumnent a dynamic array and, with the addition of 1 line of code in the ... sub, gurarantee the existing code will work. ... duplicating an entire routine is a terrible solution. ... if the subroutine is meant to modify the value ...
    (comp.databases.pick)