|
In case you care, here[^] are some test results, seems like you are right.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Thanks. I had already seen your other message. You should make clear what build you used (debug/release) and what optimization level, it may be relevant, not to the outcome, but to the relative difference.
And the conclusion should be: moves are not free; try and combine them with actual calculations.
|
|
|
|
|
You may have a look at the assembly code (compile with /E option).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yeah, i thought of that too...
I think i will just try to write a small proggie that test these methods and see which performs better.
Thanks for your answer.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
both compiled down to the same code for me.
|
|
|
|
|
Try with optimizations turned off.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
|
That's odd...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
In case you care, i did the testing, here are[^] the results.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Yes, I can care.
Anyway I wouldn't use a debug build for a speed test.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Just for you ( ), here are the results of a release build with "default" optimization (for speed):
<1a> 0.0000022349 sec
<1b> 0.0000019556 sec
<2 > 0.0000019556 sec
----------
<1a> 0.0000016762 sec
<1b> 0.0000016762 sec
<2 > 0.0000016762 sec
----------
<1a> 0.0000016762 sec
<1b> 0.0000016762 sec
<2 > 0.0000016762 sec
----------
<1a> 0.0000016762 sec
<1b> 0.0000016762 sec
<2 > 0.0000019556 sec
----------
<1a> 0.0000016762 sec
<1b> 0.0000016762 sec
<2 > 0.0000019556 sec
and with optimizations turned off:
<1a> 0.7622823571 sec
<1b> 0.7618152586 sec
<2 > 0.5077494486 sec
----------
<1a> 0.7632852779 sec
<1b> 0.7537491497 sec
<2 > 0.5121279380 sec
----------
<1a> 0.7620644523 sec
<1b> 0.7755153239 sec
<2 > 0.5118524840 sec
----------
<1a> 0.7574504581 sec
<1b> 0.7570453787 sec
<2 > 0.5195719009 sec
----------
<1a> 0.7594526679 sec
<1b> 0.7610942173 sec
<2 > 0.5190137294 sec
[EDIT] I wonder where the "variance" of the time needed for the 2nd method comes from with optimizations applied.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Thank you, sir.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi!
I want to write program like Nero express 8. Write Data CD|DVD program with Nero burn standard.It have multi session (CD empty & CD had data)
I use window XP & visual C 6.I want to this program run on window 7,XP.Help me !
I need code.I found but not found code & tutorial!
Thanks for good friends!!!
18/06/2010
Tuan,College 8,Ho Chi Minh City of Vietnam
|
|
|
|
|
tuan1111 wrote: I want to write program like Nero express 8.
The first thing you need to do is research how to transfer data from disk to DVD, a Google search will probably help you.
It's time for a new signature.
|
|
|
|
|
How pointless may be a request like: "Gimme code for duplicating the behaviour of an existing application?"
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ShellExecute(NULL, _T("open"), _T("copy existing_application.exe my_application.exe"), NULL, NULL, SW_SHOW);
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Check out IMAPI.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Im trying to pass more than one parameter which I transformed to a thread.
|
|
|
|
|
Since the thread function accepts a void * as argument (or type compatible with), you may pass a pointer to a whole struct of parameters.
Moreover, the thread functiom may access global variables (however, you shouldn't abuse of).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try avoiding using globals at all costs. There are very few situations in which you have to use global variables.
|
|
|
|
|
I don't completely agree with you. It may be a quick good rule for the newbie. On the other hand the experienced may choose using globals (for instance in small, self-contained projects)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You're right. I've reread my message and I sounded like such a Troll.
There are situations in which using globals is not a bad idea. If you have something like:
static const std::string application_name = "MyApplication";
passing it as a parameter is counter productive. So this is a situation in which you SHOULD use globals.
However, most times, passing variables as arguments rather than using globals is a better design choice.
|
|
|
|
|
Alternatively he can use static members of a class instead of "pure" globals, that "looks a bit more object oriented".
class CGlobals
{
public:
static int gGlobalInt;
static double gGlobalDouble;
static short gGlobalWarming;
};
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Computers don't kill programs, users kill programs <
> "It doesn't work, fix it" does not qualify as a bug report. <
|
|
|
|
|
Hi!
When I run my project, a window opens and immediately colses showing exception. When I break this exception, program control goes to a file called CEGUIDynamicModule.cpp. The output Window shows this:
'CricketGUI.exe': Loaded 'E:\CricketGUI\CricketGUI\Debug\CricketGUI.exe', Symbols loaded.
'CricketGUI.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'CricketGUI.exe': Loaded 'E:\CricketGUI\CricketGUI\Debug\CEGUIBase_d.dll', Symbols loaded.
'CricketGUI.exe': Loaded 'C:\Windows\System32\winmm.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\user32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\gdi32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\advapi32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\ole32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\oleaut32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\oleacc.dll'
'CricketGUI.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcp90d.dll', Symbols loaded.
'CricketGUI.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll', Symbols loaded.
'CricketGUI.exe': Loaded 'E:\CricketGUI\CricketGUI\Debug\CEGUIIrrlichtRenderer_d.dll', Symbols loaded.
'CricketGUI.exe': Loaded 'E:\CricketGUI\CricketGUI\Debug\Irrlicht.dll', Binary was not built with debug information.
'CricketGUI.exe': Loaded 'C:\Windows\System32\opengl32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\glu32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\ddraw.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\dciman32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\setupapi.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\dwmapi.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\shimeng.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\apphelp.dll'
'CricketGUI.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\shell32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\shlwapi.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\userenv.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\secur32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\winspool.drv'
'CricketGUI.exe': Loaded 'C:\Windows\System32\mpr.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\imm32.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\msctf.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\lpk.dll'
'CricketGUI.exe': Loaded 'C:\Windows\System32\usp10.dll'
'CricketGUI.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll'
Irrlicht Engine version 1.7.1
Microsoft Windows Vista Professional Service Pack 2 (Build 6002)
'CricketGUI.exe': Loaded 'C:\Windows\System32\uxtheme.dll'
First-chance exception at 0x7608fbae in CricketGUI.exe: Microsoft C++ exception: CEGUI::GenericException at memory location 0x002bd0f4..
Unhandled exception at 0x7608fbae in CricketGUI.exe: Microsoft C++ exception: CEGUI::GenericException at memory location 0x002bd0f4..
How to solve this exception and run my application?
|
|
|
|
|
have you tried single step debugging/tracing it and/or logging information ?
'g'
|
|
|
|