|
Flops refers to the number of FLoating point Operations Per Second.
|
|
|
|
|
Have you tested it by collecting the DateTime before the method and the DateTime afterwards and then calculating the difference to see what is actually faster? I know your looking for documentation, but never throw out good old fashioned testing.
Just because we can; does not mean we should.
|
|
|
|
|
Yeah, I've done tests... Proved the exact opposite. But he wouldn't even look at my test program to see the results. I was hoping for more data... Not that it would be read.
Hogan
|
|
|
|
|
Wow. He's trying to hide his complete ignorance by dropping buzzwords on people. Measuring the speed of an activity in FLOPS is like measuring the speed of a car in liters of Gas per hour.
|
|
|
|
|
That is a proven tactic when you're absolutely clueless about what you are doing.
A skill commonly found in managers s
|
|
|
|
|
Dave Kreskowiak wrote: Measuring the speed of an activity in FLOPS is like measuring the speed of a car in liters of Gas per hour.
Now you cause me to doubt my comprehension of this. FLOPS would be specific and consistent on the particular system yes? So doesn't work for the OPs statement since ArrayList processing is going to run at the same per second rate as anything else on that system, yes? However a car operates at a variable rate of speed so, my head esplode like a liter of Gas!
led mike
|
|
|
|
|
ignorance == incompetence?
|
|
|
|
|
I'm also having problems comprehending how much floating point arithmetic .Net needs to copy memory.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I'm also having problems comprehending how much floating point arithmetic .Net needs to perform to copy an 8 byte pointer
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I'm also having problems comprehending how much floating point arithmetic .Net needs to perform to copy a pointer
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Crud, it kept timing out
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
when passing the information from method to method, an arraylist is not the most efficient taking up to 60,000 flops to pass the information therefore arrays are faster.
That's not only wrong, it's also wrong.
When passing information to a method, it takes exactly the same time to pass an Array as an ArrayList. They are both objects, so what you pass to the method is a reference to the object. A reference is just a pointer, so on a 32 bit system it's only four bytes to copy.
Whatever you do with an ArrayList, there are no floating point operations going on. You could say that an operation would use the equivalent of 60000 flops, but it's hardly useful to measure operations that doesn't use floating point operations in flops.
Also, there are so much more to consider than the raw processor load. You have so many other factors that affect the performance, like cache sizes, memory bandwidth, data bus width, data aligning, instruction pairing... And there are also other things to consider than just performance, like robustness and scalability.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I think I made the same point, errr, 4 times
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I created a bitmap object and used it to draw a 2D terrain programatically on a form. Then I also added a picturebox control to display an image near the terrain.
However, the picturebox control is blocking out part of the bitmap.
How do I make the bitmap "cover" part of the picturebox control instead?
Is there a "layers" method which the form can use to draw one bitmap over another control?
Edit/Delete Message
|
|
|
|
|
If by saying "the picturebox control is blocking out part of the bitmap." you mean it shows some of the picture then set the picturebox control's (Image I think) property to Stretch.
|
|
|
|
|
Drawing an image to the form itself will always place the image behind the controls.
Just because we can; does not mean we should.
|
|
|
|
|
Hi guys,
I am trying to validate if a user exists in a database but I get an error.
The error message that I get is:
Syntax error in string in query expression 'UserName = '"userName'
"userName = username in textBox"
Can somebody tell me where I'm going wrong here please?
private void btnchkUser_Click(object sender, EventArgs e)
{
string sql = "SELECT UserName FROM Users WHERE UserName = '" + txtboxUserName.Text;
OleDbCommand cmdb = new OleDbCommand(sql, conn);
conn.Open();
OleDbDataReader drr = cmdb.ExecuteReader();
if (drr.Read() == true)
{
MessageBox.Show("User already exist", "User already exist", MessageBoxButtons.OK);
return;
}
conn.Close();
}
|
|
|
|
|
string sql = "SELECT UserName FROM Users WHERE UserName = '" + txtboxUserName.Text;
The error tells you what the problem is:
Syntax error in string in query expression 'UserName = '"userName'
Here is the correct version of your query:
string sql = "SELECT UserName FROM Users WHERE UserName = '" + txtboxUserName.Text + "'";
|
|
|
|
|
Brilliant. That works 100%.
Thanks mate
|
|
|
|
|
Please don't do this - you are leaving your code wide open to a SQL Injection attack. Try reading this[^] article.
|
|
|
|
|
I have a question that i can't seem to answer. Is there a dependence between a point and a pixel (for example 1 point = 2 pixels). I need to know this because i want to make the width of a PictureBox so it can hold a string.
The font i am using is Arial 8 points.
When try with pictureBox.Width = line.Length * 8; the PictureBox is wider than the string.
How can i find the length of the string in pixels?
Still learning...
|
|
|
|
|
|
Thank you very much!
Still learning...
|
|
|
|
|
Hi,
I have the following:
namespace Server.Layer1
{
public class BaseClass : MarshallByRefObject
{
public enum SomeEnum
{
Zero = 0,
One = 1
}
abstract public IMyInterface CreateImplmentor(SomeEnum anEnum);
}
}
Here is IMyInterface
namespace Server.Layer2
{
public interface IMyInterface
{
bool Save(Student aStudent);
event AnEventHandler SomethingHappened;
}
public delegate void SomethingHappened(object sender, EventInfo e);
}
I have registered the class which implements the BaseClass functionality and register it using a
console application host. Compiles fine.
I have a client but when it connects to BaseClass, exception is thrown at this line:
BaseClass classReceived = (BaseClass ) RemotingServices.Connect(typeof(BaseClass),
"http://localhost:65100/RemoteClass");
Exception is: "Trying to create a proxy to an unbound type."
Student is Serializable. BaseClass is MarshalByRefObject and so is the class which implements the IMyInterface. I am not sure what the problem could be. If a class inherits from MarshalByRefObject and has delegates or events, do they need any special attributes?
Please help,
Thanks
|
|
|
|
|
Hi,
I have an issue where I get a pointer to unmanaged data (along with the number of bytes allocated) from a device and I need to perform a checksum on this data. While I have found plenty of information to pin a managed array and feed that to a C library call, I have been unable to find any methods for going to other way around.
public static byte[] MD5Checksum(unsigned char* data, int dataLength){<br />
<br />
byte[] unmanagedWrapper = MagicalMethodToWrapUnmanagedArray(data, dataLength);<br />
<br />
return System.Security.Cryptography.MD5.Create().ComputeHash(unmanagedWrapper);<br />
}
Thanks in advance!
B
|
|
|
|