|
|
Thanks Eddy!
That's what I needed!
Unfortunately I had not found that article...
|
|
|
|
|
I am starting to work on a polygon library, whose side are bezier curves. The basic don't quite work yet so I can't really write stress / performance test program yet. nor show much code.
At any rate I have classes like that
public class BezierFragment
{
Point2D[] controlPoints;
}
public struct Point2D { public double X, Y; }
But I am wondering whether I should instead use struct (for less heap allocation and more stack copies)
public struct BezierFragment
{
byte order;
Point2D p0, p1, p2, p3;
}
public struct Point2D { public double X, Y; }
The later is much easier on the memory management, but might require more copy (of 65 bytes) struct. I wonder which one would be best.
How would I figure out the best option?
The (possible) memory management issues of the first choice might only be apparent when lots of Point2D[] array are saved in generation 2 memory pool and then destroyed...
Any tip?
modified 13-Feb-18 20:37pm.
|
|
|
|
|
Found that:
Choosing Between Class and Struct | Microsoft Docs
it says (one criteria for struct)
It has an instance size under 16 bytes.
if I use float for X, Y in Point2D, should be 33 bytes overall.... (or 36? with struct padding) might be too big...
|
|
|
|
|
This should only be a problem if you're using decimal.
A float pair should only be 8 bytes (plus anything else you have in the struct). You should even be able to scale up to a double pair and ride that limit line.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
I think the concern was the second version of BezierFragment , which has a byte plus four double pairs, all of which would be inline.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ugh, more coffee.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
How to add columns dynamically to wpf datagrid in MVVM without using dependency properties
|
|
|
|
|
|
Hi. I have a special software which only accept pointgray or ids camera.
They are industrial cameras and are very expensive.
industrial cameras are the same as webcam but with enhanced functionality.
Is it possible to write an application which can create a virtual industrial camera, and get photos from a webcam and feed it to that software? the only problem is that software does not accept any other cams except than IDS and pointgray.
|
|
|
|
|
Yes; they are called "simulators".
You create an API for the target camera.
You then create a simulator that mimics the camera's API.
You then either "connect" to the real camera or the simulator.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
In vb.net I can create an application to capture from a webcam using aforge.NET. But i need help to create a simulatir. I searched both ptgray and IDS websites for if there is any kind of simulator, but not found.
Can you guide me how to start to create a simulator?
|
|
|
|
|
How does one "communicate" with the "target" camera now?
What "SDKs" (Software Development Kits) does the vendor provide?
Are you the only one on this project? If so, set aside a few years.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
What are the best web designing trends to watch out in 2018?
|
|
|
|
|
Please don't repost if your message does not appear immediately: both of these went to moderation and required a human being to review them for publication. In order to prevent you being kicked off as a spammer, both had to be accepted, and then I have to clean up the spare. Have a little patience, please!
I've deleted the spare version.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I didnt post this question again! Even I just submit it once and still I didnt get proper guideline about latest trends.
|
|
|
|
|
The trend for 2018 is people getting predictions for the future from a forum. 2019 will be the same, but it will move from the forum to Q&A.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
There are new JavaScript frameworks coming out that you should jump on immediately. I have no idea what they are but new JavaScript bandwagons come along with alarming frequency.
This space for rent
|
|
|
|
|
More frameworks.
The efficacy of the platform itself is inversely proportional to the number of available frameworks.
Increased bandwidth (and clearer ways of thinking) will make the whole "stack" obsolete.
"Web development" is another name for thin, dumb clients.
Been there, done that. 80's technology.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
You forgot to mention that this is the year that WASM will finally become main stream, because it's the year of the Linux desktop!
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
That sounds like a good thing ... since the only other thing mentioned in the article was JavaScript; and not a single framework.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hello @Gerry Schmitz,
May be you right, But now a days every body going for easy and free ways. Like Wordpress, this will really helpful for every one. Its gives various kind of themes with amazing picture and different designs.
Regards
Priya Kale
|
|
|
|
|
That's what I like to hear!
"Everyone" .... "WordPress", etc.
It's saturated; everybody is a "web developer".
No one knows how to make a "thick" client.
I'm making a killing in the desktop market because it's "empty" of competition.
(I forgot to add: "everyone" is also a blogger; who needs a WordPress site; etc... for $20)
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Gerry Schmitz wrote: No one knows how to make a "thick" client. Rich in humor
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Never heard of rhetoric?
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|