Article View: comp.lang.c.moderated
Article #2509Re: Efficiency Question : bits vs. bytes (or anything else, for that matter)
From: David E. Wallace
Date: Fri, 05 Apr 1996 00:39
Date: Fri, 05 Apr 1996 00:39
17 lines
1449 bytes
1449 bytes
In article <4jq1dc$a1g@solutions.solon.com>, richard mross <uar@southwind.net> wrote: >compile both cases with the "generate assembly output file" option >and compare the assemply output, then count the cpu cycles for each of >the instructions used on each of the outputs Someone should note that this approach really only works for extremely simple systems (no virtual memory, no cache, no superscalar, etc.). These performance enhancers also add a lot of variability to how long a given instruction takes. Someone who is good enough to be able to predict cache hit rates (and how they will affect the performance of the code) from a static analysis of the assembly output probably wouldn't be posting here asking which approach was more efficient. For most people, actual measurement of the run time on the intended hardware is a better way to go. -- Dave Wallace (wallace@netcom.com)
Technical Details
Message-ID:
<4k1q48$5c7@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4jbciv$2kk@solutions.solon.com> <4jq1dc$a1g@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: wallace@netcom.com (David E. Wallace) Newsgroups: comp.lang.c.moderated Subject: Re: Efficiency Question : bits vs. bytes (or anything else, for that matter) Date: 4 Apr 1996 18:39:36 -0600 Organization: NETCOM On-line Communication Services (408 261-4700 guest) Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4k1q48$5c7@solutions.solon.com> References: <4jbciv$2kk@solutions.solon.com> <4jq1dc$a1g@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com