473,902 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mystery: static variables & performance

I've encountered a troublesome inconsistency in the C-language Perl
extension I've written for CPAN (Digest::SHA). The problem involves the
use of a static array within a performance-critical transform function.
When compiling under gcc on my big-endian PowerPC (Mac OS X),
declaring this array as "static" DECREASES the transform throughput by
around 5%. However, declaring it as "static" on gcc/Linux/Intel
INCREASES the throughput by almost 30%.

I would prefer that the array not be "static" so that the underlying C
function will be thread-safe. However, giving up close to 30%
performance on gcc/Linux/Intel is unacceptable for a digest routine,
whose value is often closely tied to speed.

Can anyone enlighten me on this mystery, and recommend a simple, clean,
portable way to assure good performance on all host types?

TIA, Mark

Nov 14 '05
115 7698
Mark McIntyre wrote:
eh? Your own text, quoted below, makes it clear that you have some problems
w/ the concept.
Mr. McIntyre's apology was directed to Sidney, and it was posted more than
two hours after my message. So, your use of the word "already" is a bit
baffling.
you've offered no direct apology.


I did.

You've used selective snipping, and thereby misrepresented the
situation. You directed the term "nazi" at me, not Sidney. Here's my
original text:

"As Sidney pointed out, you aimed your use of the term "nazi" directly
at me, and I agree with Sidney that this took it one step too far. Yet,
you've offered no direct apology. The tone of your opening paragraph
signals that you're not in an apologetic mood at all. So, your FWIW is
not worth very much."

So, an apology to Sidney, while laudable, is hardly sufficient.

*shrug*. YMMV but frankly I begin to think you're a troll.

Wonderful. It's a free world, so you can simply choose not to
contribute to this thread if you truly believe that.

Nov 14 '05 #71
Joona I Palaste wrote:
Furthermore, in case you don't know it yet, the business with the word
"Nazi" was not the only reason I decided to killfile you, Mark Shelor.
I've fed up with you, and this was the last straw.

OK, lil' Joona, you've slammed your bedroom door and are now ready for a
good pout. Once you've calmed down and are ready to talk again, perhaps
you can articulate some sound reasons that prompted you to issue the
deadly plonk.

With Parental Understanding and Good-Will, Mark

Nov 14 '05 #72
Richard Bos wrote:
Demonstrably? Well, then, please demonstrate this - taking into account
the fact that I find this the most helpful computing group I know, and
the less so the more system-specific posts there are.

Try visiting, say, comp.lang.perl. misc. The folks there are quite helpful.

Mark

Nov 14 '05 #73
On Mon, 16 Feb 2004 18:29:00 -0700, Mark Shelor wrote:
Richard Bos wrote:
Demonstrably? Well, then, please demonstrate this - taking into account
the fact that I find this the most helpful computing group I know, and
the less so the more system-specific posts there are.

Try visiting, say, comp.lang.perl. misc. The folks there are quite helpful.

So are the folks here, it's just that they try to keep this a useful forum
but _not_ allowing implementation specific questions.
I've said it before and I'll say it again: You are not going to succeed in
forcing comp.lang.c to be what you seem to want. The best you are going to
achieve is to alienate everyone that could help you. And when they
killfile you here they won't see your questions in another group where it
would be on-topic.

If you are serious about the need for a group for all encompassing
discussion about C including implementations and plattform specific
details you should work to create such a group instead of trying to change
an existing group into it.

I expect to see your proposal for comp.lang.c.eve rything (or some
similarly named group) posted to news.groups shortly. Failure to post such
a proposal would indicate that you don't really care that much about
having a forum for discussion of _all_ aspects of C, and are not willing
to do the work nessesary to create such a forum.

(You could ofcourse propose to create a charter for c.l.c that would make
everything on topic, but I believe you'd have far better chances of
success if you try to get a separate group created)

If you don't care enough to make such a proposal, but keep on complaining
here about why c.l.c should be a group like that I will believe that you
don't really care about finding a forum where your questions are welcome,
and that all this is merely you whining because your ego got hurt when you
where directed to post your question somewhere else.

--
NPV

"the large print giveth, and the small print taketh away"
Tom Waits - Step right up

Nov 14 '05 #74
Nils Petter Vaskinn wrote:
I've said it before and I'll say it again: You are not going to succeed in
forcing comp.lang.c to be what you seem to want. The best you are going to
achieve is to alienate everyone that could help you. And when they
killfile you here they won't see your questions in another group where it
would be on-topic.

Thank you, Nils, for taking the time to compose these obviously
heart-felt remarks. It's clear you're trying to be helpful, and I
appreciate that.

Am I trying to force c.l.c to be anything other than it is? No, that's
not my style, and such an endeavor would be pure folly and a source of
intense frustration. Yes, I'm disappointed in some of the behavior I've
seen, and yes I've said that I would prefer to see a greater sense of
receptiveness and helpfulness in this group. But I'm also realistic
enough to know that people will be as they are.

If you carefully review the remarks made in this thread, you'll see that
I'm not the one who's attempting to force a particular behavior.
Frankly, the not-so-subtle attempts at persuasion are moving in quite
the opposite direction.

If someone chooses to killfile me, that's their privilege. I certainly
regret that people would willingly choose to subject themselves to a
form of self-censorship. But if it helps to spare them frustration,
then it's probably a reasonable course of action.

Please make no mistake, though: if someone posts a remark to this thread
that either reflects a misunderstandin g or makes a personal attack, I
will more than likely respond. And, if I detect that someone is
attempting to censor my remarks, I will almost certainly respond. I've
repeatedly advised that if people don't like this thread or believe it's
off-topic, then their best course of action would be to ignore it.

I expect to see your proposal for comp.lang.c.eve rything (or some
similarly named group) posted to news.groups shortly.

Is that an order? Perhaps you didn't intend it to come across that way,
but you could have certainly phrased the idea in a more respectful tone.
Failure to post such
a proposal would indicate that you don't really care that much about
having a forum for discussion of _all_ aspects of C, and are not willing
to do the work nessesary to create such a forum.

Or, that forming such a newsgroup would fall relatively low on my list
of life's priorites.

Would I like to see c.l.c have the same friendly atmosphere as
comp.lang.perl. misc? Yes, and I'd also like to have Liv Tyler show up
on my doorstep and say "I just dumped Royston Langdon, and I'm all yours
now, Big Boy", but that's simply not going to happen, now is it?

If you don't care enough to make such a proposal, but keep on complaining
here about why c.l.c should be a group like that I will believe that you
don't really care about finding a forum where your questions are welcome,
and that all this is merely you whining because your ego got hurt when you
where directed to post your question somewhere else.

I'm not complaining, but merely trying to encourage some of you to
display a bit more largesse when responding to others. And, if you look
at the civilized tone of my posts, especially compared to the vitriolic
remarks made by others, I believe you'll find your rather heavy-handed
attempt at psychoanalysis a bit misdirected.

Regards, Mark

Nov 14 '05 #75
On Tue, 17 Feb 2004 02:35:17 -0700, Mark Shelor wrote:
Nils Petter Vaskinn wrote:
If you carefully review the remarks made in this thread, you'll see that
I'm not the one who's attempting to force a particular behavior.
Frankly, the not-so-subtle attempts at persuasion are moving in quite
the opposite direction.
You are correct, both "sides" are trying to force a particular behaviour.

You are trying to get the group to behave in the way you want.

The group is trying to get you to behave in the way that most group
members already does.

I know who I think is beeing unreasonable.

If someone chooses to killfile me, that's their privilege. I certainly
regret that people would willingly choose to subject themselves to a
form of self-censorship. But if it helps to spare them frustration,
then it's probably a reasonable course of action.
Censorship is not allowing somone else to make a statement.
Self-censorship is deciding (for whatever reason) not to make a statement.
Choosing not to listen to someone elses statement has nothing to do with
censorship.
Please make no mistake, though: if someone posts a remark to this thread
that either reflects a misunderstandin g or makes a personal attack, I
will more than likely respond. And, if I detect that someone is
attempting to censor my remarks, I will almost certainly respond. I've
repeatedly advised that if people don't like this thread or believe it's
off-topic, then their best course of action would be to ignore it.
The general rule is that topicality is always on topic. But the discussion
sprang from you (apparently) not accepting the answer ("ask somewhere
else") you got.

People have explained why they believe not redirecting offtopic questions
isn't their best course of action. (Then someone unaware of topicality
could answer and people would come back and the quality of clc would
degrade. People would post again since they didn't get an answer ... etc).
You could:

1. Explain why you think the questions should be on topic and why that
would be better for the group as a whole.
2. Explain why ignoring offtopic posts is better at preserving topicality
than redirecting those posts.
3. Accept things as they are.

You have as far as I know done neither. You have instead been claiming
that your way is better without explaining why it is better for the
members of this group.
I expect to see your proposal for comp.lang.c.eve rything (or some
similarly named group) posted to news.groups shortly.

Is that an order? Perhaps you didn't intend it to come across that way,
but you could have certainly phrased the idea in a more respectful tone.


No not an order. I said I "expect", that is given that you actually care
as much as your posts in this thread seems to indicate. The reason for the
"tone" is that when people complain about something and then fail to make
the obvious steps to change them I get a little impatient with them.
Failure to post such
a proposal would indicate that you don't really care that much about
having a forum for discussion of _all_ aspects of C, and are not willing
to do the work nessesary to create such a forum.

Or, that forming such a newsgroup would fall relatively low on my list
of life's priorites.


Then why does changing this newsgroup, a task that is probably harder
while achieving the same end result, appear to have a higher priority?
Would I like to see c.l.c have the same friendly atmosphere as
comp.lang.perl. misc? Yes, and I'd also like to have Liv Tyler show up
on my doorstep and say "I just dumped Royston Langdon, and I'm all yours
now, Big Boy", but that's simply not going to happen, now is it?


It has the same firiendly athmosphere, it's just that your insistence on
doing things your way means you fail to see the friendly side. clc isn't
unfriendly, it just refuses to discuss everything somehow related to C.

You can make clc be friendly to you by keeping on topic, and finding or
creating another forum for the questions that are offtopic here. If as you
say the topicality in clc is so horribly limiting people would flock
tou your new forum. As for Liv Tyler there is nothing (probably) you could
actively do to make that happen, so there is a difference between her and
clc.
If you don't care enough to make such a proposal, but keep on complaining
here about why c.l.c should be a group like that I will believe that you
don't really care about finding a forum where your questions are welcome,
and that all this is merely you whining because your ego got hurt when you
where directed to post your question somewhere else.

I'm not complaining, but merely trying to encourage some of you to
display a bit more largesse when responding to others. And, if you look
at the civilized tone of my posts, especially compared to the vitriolic
remarks made by others, I believe you'll find your rather heavy-handed
attempt at psychoanalysis a bit misdirected.


Your actions fit my definition of "complainin g".

The vitriol is cased by people having seen threads like this one too
many times before:
1. Person appear out of nowhere.
2. Person posts a question that's offtopic.
3. Person is told that it's offtopic (and often told where it would be on
topic)
4. Person starts complaining that he should be allowed to post it, instead
of taking the advice and look for answers elsewhere.

The redirections may seem rough, but beeing polite is hard when a person
obviously hasn't followed usual usenet etiquette by:
1. Reading the faq, which would let him know what is on topic
2. Reading the group, to see what the group is about, which would probably
make him aware of what is on topic, and what to expect if he's posting
offtopic.

And if you read some of the rest of the group you may notice that the
"style" of the group isn't to sugercoat anything. If a posted piece of
code has a flaw people don't say "That may not work as you expected" they
say "That's wrong", and if they're in a good mood they tell why it's
wrong. The same style shines through in the redirects. CLC is about
accuracy and correctness, and packing the message in politeness detracts
from accuracy.

--
NPV

"the large print giveth, and the small print taketh away"
Tom Waits - Step right up

Nov 14 '05 #76
On Mon, 16 Feb 2004 18:29:00 -0700, Mark Shelor
<ms*****@comcas t.removeme.net> wrote:
Richard Bos wrote:
Demonstrably? Well, then, please demonstrate this - taking into account
the fact that I find this the most helpful computing group I know, and
the less so the more system-specific posts there are.

Try visiting, say, comp.lang.perl. misc. The folks there are quite helpful.

Mark


Are they really good with questions about the C language? Should I
switch?

--
Al Balmer
Balmer Consulting
re************* ***********@att .net
Nov 14 '05 #77
On Mon, 16 Feb 2004 17:58:09 -0700, in comp.lang.c , Mark Shelor
<ms*****@comcas t.removeme.net> wrote:
you've offered no direct apology.
I did.


You've used selective snipping, and thereby misrepresented the
situation.


Nope. You've misunderstood it.
"As Sidney pointed out, you aimed your use of the term "nazi" directly
at me, and I agree with Sidney that this took it one step too far. Yet,
you've offered no direct apology. The tone of your opening paragraph
signals that you're not in an apologetic mood at all. So, your FWIW is
not worth very much."

So, an apology to Sidney, while laudable, is hardly sufficient.


I wasn't apologising to you, you dolt. I don't give a monkeys if I offended
you. Sidney I care about. Sidney's opinion matters.
*shrug*. YMMV but frankly I begin to think you're a troll.


Wonderful. It's a free world, so you can simply choose not to
contribute to this thread if you truly believe that.


Or I can start posting "Troll Alert" messages whenever I see you posting.
I'm still havering.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #78
Alan Balmer wrote:
On Mon, 16 Feb 2004 18:29:00 -0700, Mark Shelor
<ms*****@comcas t.removeme.net> wrote:
Richard Bos wrote:
Demonstrably ? Well, then, please demonstrate this - taking into account
the fact that I find this the most helpful computing group I know, and
the less so the more system-specific posts there are.


Try visiting, say, comp.lang.perl. misc. The folks there are quite helpful.


Are they really good with questions about the C language? Should I
switch?

What?

Oh, I get it. That was your idea of a joke, wasn't it?
Mark ;)

Nov 14 '05 #79
Mark McIntyre wrote:
I wasn't apologising to you, you dolt. I don't give a monkeys if I offended
you. Sidney I care about. Sidney's opinion matters.

Please don't strain yourself. I never accused you of apologizing to me.

If hurling epithets helps to lower your blood pressure, then go for it!
It's probably better that you're more concerned with your health than
with your stature.

Or I can start posting "Troll Alert" messages whenever I see you posting.
I'm still havering.

First it was the dreaded killfile. Now it's the deadly troll-alert.
When will my worries cease?

As I've endeavored to tell you repeatedly--with politeness and
respect--if you don't care for my comments on this thread or others,
then just ignore them instead of trying to exercise censorship. If you
continue to make inflammatory remarks, I'll more than likely continue to
respond to them.

Mark

Nov 14 '05 #80

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

109
4220
by: MSG | last post by:
Michel Bardiaux <michel.bardiaux@peaktime.be> wrote in message news:<G4idnfgZ0ZfCWbrdRVn2jQ@giganews.com>... > Mark Shelor wrote: > > > > > OK, Sidney, I am considering it. I can certainly understand the premise > > that a group might choose to entertain ONLY those questions that can be > > resolved purely by a reading or clarification of (drum roll please) The > > Standard. But how utterly boring, and what a waste of talent. It > >...
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
8047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7205
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4306
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3323
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.