|
It could be a number of things, but the first thing I'd look at is the generated native code and see how it compares for the different architectures. That could make a mountain of difference.
The other things are more difficult to track down, especially with managed code - is your code remaining in the CPU's cache line as its executing?
There's also the other question, and that is Winforms, which relies heavily on the windows subsystem and unmanaged code.
If I were you, I'd fashion a barebones .NET 6+ console application that benches N iterations, 5 times overall where N is some arbitrarily large number based roughly on how long it takes to perform each iteration. Then run that on both and check your results.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
There is something more to the issue that is not apparent from the information provided. As Honey pointed out, there are many other factors to consider.
As for the code itself, it baffles me why you want to load 1M rows into a ListView control like that. You're much better off finding ways to reduce the number of rows loaded. However, if you need to do this, there are better ways like virtualization. Read this (with code sample): ListView.VirtualMode Property (System.Windows.Forms) | Microsoft Learn[^].
If you make this change, the app will run much more efficiently on both machines.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
i agree with honey and graeme
run bench that focuses on hardware performance
I use dhrystone
/*
* "DHRYSTONE" Benchmark Program
*
* Version: C/1
* Date: 12/01/84
* Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013
* Translated from ADA by Rick Richardson
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
It's not a practical application. It should get the attention it deserves.
My first thought was keyboard buffers, repetition counts and reentrancy. But there is no keyboard.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I agree. Dhrystone mainly tests integer and character operations, the most common operations.
but it's a clean start.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Configure projects to target platforms - Visual Studio (Windows) | Microsoft Learn[^]
An interesting/easy thing to try is building specifically for x86 and x64, testing both.
It's a bit weird this isn't inverted. (x64 = AMD instruction sets, afaik - even on Intel chips)
Aside that, I think strings being a bit of a special animal is likely playing into this heavily.
Also, setting a .Tag to an object (instead of a string) is "weird" but that weirdness may be a figment of my imagination and that may be a perfectly normal thing to do.
|
|
|
|
|
I just finished writing a source generator for my Visual FA project that lets you easily define lexers which it will then implement for you.
The same day, it turns out I needed a lexer for work in order to parse a C header and make a CSV out of particular data in it.
This isn't the first time something like that has happened to me, and it never gets old.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Yeah, I hear that.
Boss: We need a tool which will blah blah blah...
Me : You mean like my [insert name of utility]...?
|
|
|
|
|
PIEBALDconsult wrote: Me : You mean like my [insert name of utility]...? Exactly! Ah, the number of times that has happened, it's so sweet, lol.
|
|
|
|
|
Yes. I realized I had a pretty decent "geometry" library; just when I though I had to write some (more). Just needed to put them all in the same namespace / mindspace.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Your subconscious is driving the todo list your conscious mind doesn't even know exists.
|
|
|
|
|
Apparently my subconscious knows my colleagues plans ahead of time as well. Not sure how I feel about that.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I need to show some value for continous measurement(s):
a.) Current Measurement Value
b.) Mean Value of the measurements
c.) Standard deviation of the measurements
c.) In case there is no or only one measurement... From my point of view, I should not show any value here. Not even 0
b.) I have my doubts. The mean value is the current value. Or should I also show blank?
a.) Is easy. As soon one has measured it is easy to show current valu
Especally b.) drives me crazy
Any suggestions/thoughts? Thank you very much in advance
|
|
|
|
|
I think we'd need more context.
Is the measurement expected to remain within some range?
Do measurements expire after some time elapses?
|
|
|
|
|
Simply measurements 1...N. No restrictions.
The question is: If I have only one measurement, should I display
1.) A mean Value?
2.) A Standard Deviation (which would be 0 for one measurement)
Thanks
|
|
|
|
|
Maybe display the latest value and allow the user to drill down to see more of a trend (if available)?
|
|
|
|
|
1. For one measurement current value and mean value are the same. No nitpicking here.
2. Standard deviation, that's where nitpicking begins. What you actually calculate is an estimator of the standard deviation and, if you want an unbiased estimator, you need to divide the sum of squares by N-1. That means you cannot display anything until you have at least two measurements.
Mircea
|
|
|
|
|
My idea is for _one_ measurement I will display neither mean nor deviation.
But I have a strange feeling this is only nitpicking and will confuse maybe the users.
On the other hand, somebody who really understand deviation should understand it If not, display of deviation and mean does not make sense anyway, I think
|
|
|
|
|
0x01AA wrote: My idea is for _one_ measurement I will display neither mean nor deviation.
The more I think about it, the more I tend to agree with you.
Mircea
|
|
|
|
|
The more I think about it, the more confused I become
I think it is not really worth to think too much about it. But interesting to know how others think about it.
Thank you very much
|
|
|
|
|
The Mean is defined for N = 1, therefore it should be displayed.
The Corrected Standard Deviation is not defined for N = 1. It is defined as:
xavg = sum(xi)/N
xstdev = sqrt(sum((xi-xavg)2)/(N-1))
The formula for Standard Deviation with N is used when one is calculating the Standard deviation of an entire population, not just of a sample.
I hope you've been out-nitpicked.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Thank you very much for this.
Still for me, mean for N= 1 makes no sense, resp. more: has no information
|
|
|
|
|
0x01AA wrote: b.)
What about NA? (not applicable)
|
|
|
|
|
|
With 1 sample, it is read as Not available Now.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|