Re: Need _gcvt() for Unicode

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Doug Harrison [MVP] (dsh_at_mvps.org)
Date: 03/24/04


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++


Relevant Pages

  • Re: CollabRx seeks brilliant engineers for an excellent e-science adventure
    ... belief that lisp programmers are smarter/better. ... Java or PHP programmers. ... a type of language that attracts a personality that meets my perceptions ...
    (comp.lang.lisp)
  • Re: Question concerning object-oriented programming
    ... programming language, not his. ... there has usually been a toString. ... I know it's "unrealistic" to expect actual programmers to do this, ... tell me what a dog is. ...
    (comp.programming)
  • Re: Language X, not Forth ?
    ... As you become more familiar with a language, it's readability is a function of how much care the programmer took to make it more readable. ... The use of non-readable graphics characters doesn't help FORTH to ... All programmers I know use one sort or another to indent or highlight control flow. ... Therefore, I just don't do this kind of crazy things like juggling around with many stack elements. ...
    (comp.lang.forth)
  • Re: Does Python really follow its philosophy of "Readability counts"?
    ... with enforcing that "shouldn't" in the language itself? ... In Python, direct access to pointers is a MUST NOT. ... where you are allowed to mess with the implementation. ... human assembly language programmers? ...
    (comp.lang.python)
  • Re: FORTH levels
    ... Most working on a collaborative project do not choose the programming language they are using: it is thrust upon them by the needs of the collaboration. ... When Iverson and Hui came up with J-- in part to remove APL's special character set and make it more "user friendly" not much of a community formed around it. ... And people who are by not by any reasonable stretch of the term "programmers" seem to take to Perl. ... But RPN does not require a visible stack, any more than any language requires a visible stack to rebuild its semantic trees from its flat expression. ...
    (comp.lang.forth)