Re: Need _gcvt() for Unicode
From: Doug Harrison [MVP] (dsh_at_mvps.org)
Date: 03/24/04
- Next message: Doug Harrison [MVP]: "Re: Drawing a Circle"
- Previous message: TOAD: "how to chang image data to be saved as BMP."
- In reply to: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Next in thread: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Reply: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Mar 2004 23:43:32 -0600
Jonathan Wood wrote:
>But, as I've pointed out to
>others, I find it interesting that this point is being emphasized by C
>programmers. Some clients I have won't touch C unless it is absolutely
>necessary. VB development is many times quicker and we have large VB apps
>where no one has complained about the performance.
I don't doubt that for a second. People tend to stick with whatever they're
familiar with, especially if it's good enough, in which case, there's no
reason to use anything else.
>But we both know that C can be smaller and faster. Sometimes a tiny routine
>can be smaller and faster written in assembler. It's up to us, as
>programmers, to decide how far to take it. But it seems pretty arbitrary to
>me to decide using C is worthwhile but assembler is not.
As this is an MFC group, we're talking about C++. (But even C is a high
level language compared to assembly language.) Compared to assembly
language, C provides structured programming constructs, much nicer notation,
a fair degree of type safety, and some hidden mechanics (e.g. setting up
function prologues and epilogues). C++ adds direct support for OOP, more or
less adequate support for generic programming, and exception handling. Both
languages are as bare to the metal as possible, and code written in either
can be as fast to run as hand-crafted assembly language but is far quicker
to develop, far easier to maintain, and far more portable. It's reasonable
to use C++ as one's primary language and to develop large programs with it.
Many thousands of people do just that.
I don't know much about VB so can't comment on that, except to note that
many people have continued to use C++ as their primary language despite the
availability of VB. You can't say that about assembly language and C++.
>What am I missing here? If your output is:
>
>> 63613.231552 sprintfs/sec
>> 37119.524870 _gcvts/sec
>> 70323.488045 _ecvts/sec
>
>It would appear that _gcvts is about twice as fast, not half.
>(Interestingly, _ecvts does appear a bit slower than sprintf.)
That data is expressed as function calls per second.
-- Doug Harrison Microsoft MVP - Visual C++
- Next message: Doug Harrison [MVP]: "Re: Drawing a Circle"
- Previous message: TOAD: "how to chang image data to be saved as BMP."
- In reply to: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Next in thread: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Reply: Jonathan Wood: "Re: Need _gcvt() for Unicode"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|