Re: random filenames
Jason Gade wrote:
>
> Hayden McKay wrote:
> >
> > Thanks to all for your input guys. I've know adapted Jason's technique but
> > instead
> > of the byte array i'm useing;
> > }}}
<eucode>
> > if ch >= 'A' and ch <= 'Z'
> > or ch >= 'a' and ch <= 'z'
> > -- etc...
> > </eucode>
{{{
> > then check filename with 'dir()' and recurce if need to.
> >
> > nb. the code had to remain small and efficiant, it's later going to be
> > translated
> > to assembly by someone else.
>
> Can you share the code?
>
> I think a look-up table (which was my technique) would be more efficient even
> in assembler than a decision table. But I'm not an experienced assembly
> programmer.
>
> --
> "Any programming problem can be solved by adding a level of indirection."
> --anonymous
> "Any performance problem can be solved by removing a level of indirection."
> --M. Haertel
> "Premature optimization is the root of all evil in programming."
> --C.A.R. Hoare
> j.
It is. Obviously you are using more memory to pay for an increase in speed.
This is even more true on pipelined CPUs, where bad branch prediction has a
sgnificant cost.
CChris
|
Not Categorized, Please Help
|
|