[Freeciv-Dev] Re: PATCH: load_map_data macro (PR#1012)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Oct 15, 2001 at 05:36:12AM -0400, Jason Dorje Short wrote:
> Raimar Falke wrote:
> >
> > On Mon, Oct 15, 2001 at 01:30:44AM -0700, jdorje@xxxxxxxxxxxxxxxxxxxxx
> > wrote:
> > > Raimar Falke wrote:
> > > >
> > > > On Mon, Oct 15, 2001 at 03:10:17AM -0400, Jason Dorje Short wrote:
> > > > > Raimar Falke wrote:
> > >
> > > > > > dec2hex is wrong. It isn't the converting between two number systems
> > > > > > but rather a binary2ascii_hex. One side of the convertion is a
> > > > > > hex string/char and the other is a number in the internal
> > > > > > representation of the computer. This internal number doesn't have a
> > > > > > number system. It isn't decimal.
> > >
> > > > > - bin2ascii_hex, ascii_hex2bin
> > > >
> > > > This one. And now somebody will shout: Raimar takes always the longer
> > > > method names ;)
> > > >
> > > > > - bin2hex, hex2bin
> > > > > - bin2ascii, ascii2bin
> > >
> > > The attached patch makes this change.
> >
> > And another nitpick: ascii_hex2bin uses hex_chars and bin2ascii_hex
> > doesn't.
>
> True. Would it be better to switch both to the same method? If so, I'd
> rather use the mathematical method.
Whatever. I don't expect a non-small difference in performance.
> > Also I think that the function overhead of bin2ascii_hex and
> > ascii_hex2bin may be large. Have you profiled this?
>
> No, but since it's only used in loading/saving a game I can't imagine
> it's much of an issue. If you're concerned, I'll give it a full
> profile.
If you can do so.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"I do feel kind of sorry for Microsoft. Their attornies and marketing
force must have tons of ulcers trying to figure out how to beat (not
just co-exist with) a product that has no clearly defined (read
suable) human owner, and that changes on an hourly basis like the
sea changes the layout of the sand on a beach. Severely tough to
fight something like that."
-- David D.W. Downey at linux-kernel
|
|