Hi, theKris!
That worked!
So, I actually need to tell the compiler clearly that I want 2 bytes per character. What a b***s***!
I expected the Unicodestring to be a real unicodestring.
Anyway, in Delphi it works right.
Thank you very much for the solution, I would actually never think of that...
You know, patience is a virtue, and you definitely don't have it.
People have their jobs and other stuff to do, and they don't have to answer to your question right away, and sometimes answer requires further investigation.
This would be my answer to you.
Best regards, anyway.
What about using templates? I don't know about their usage in Delphi, but I use them in C++ all the time. Something like this (mind you, I never did this in Delphi, but this would be the logic as it is in C++):
//implementation of the procedure
//T is a kind of generic type which will accept...
Hi!
Have you read this (very helpfull, to me at least):
http://developersoven.blogspot.com/2007/02/leveraging-vistas-uac-with-delphi-part.html
Best regards...
Hi johncp,
yes, probably you have too few iterations for your CPU speed. If you set number of iterations higher and measure time you'll might be able to see improvement. But maybe not. For me it works nice. I saved that way around 50 or so miliseconds per iteration. I also set __fastcall to all...
Hey, Glenn9999, thanks for still being around trying to help. I really appreciate it.
About those operators. Well, I don't know, never actually thought about it (until now, when I'm desperate and trying everything that comes to my mind), but there must be something to tell compiler that when...
Hi johncp and thank you for your response!
Actually I tried many combinations of those options (thinking maybe they did something wrong with them), but those tries took me nowhere. And floating point calculations run fine (even faster than in 2006), integer arithmetic is the problem.
But...
Actually, I should have been more specific about that math library I use. It is fastmath library standardly included in the C++ Builder. All routines are coded in assembly and stripped off of the most of the error checking utilities. So, I guess, it's very fast.
But, I have new info on the...
I have new info on the problem.
I did some testing and what I came up with is: integer arithmetic is about 7 times slower in 2009 than in 2006 (at least on my computer). So, my thinking is that something is wrong with the code performing integer arithmetic, but I would definitelly like to know...
Thanks, 2ffat, for your response.
I use standard built in math library.
I might try some other libraries, if I find any.
But the question remains: why the same code runs slower now?
I guess they didn't update their math library to make it slower?
Best regards...
Thank you, 2ffat, for your response.
Actually the same happens with label, edit and richedit components, too. So, I guess, it's not up to the memo.
1) Will check for updates, but I think studio is updated.
2) Nothing happens, you get boxes and question marks instead of real letters, which is...
Thank you both guys!
Yes, Glenn9999, I already tried Sampling Profiler, and it, too, shows that the calculations are the most intensive part of the program.
But, I simply can't believe it's so different now. It should run the same or even faster than before.
You know, I ported another...
Thanks DjangMan!
As a matter of fact I've already read that paper by Marco Cantu. I'm in the process of trying some stuff he mentioned. No luck so far.
The second link is ok, but not helpfull.
Anyway, I did a workaround of some sorts. I save all the text I'm using in my program to the unicode...
Thank you, Glenn9999, very much for your very quick response and for your input!
First of all, I should be more specific on that speed part. Actually 300 ms is quite good time, even excellent. What does matter is the running time of only one iteration, as it usually runs through only one. Only...
Hi!
Me again :-)
Consider this piece of code:
s: UnicodeString;
s := '?? ?? ?? ?? ?? ?? ?? ????????????????????';
Memo1.Lines.Add(s);
and the same lines in C++ Builder:
UnicodeString s;
s = "?? ?? ?? ?? ?? ?? ?? ????????????????????";
Memo1->Lines->Add(s)...
Hi!
Me again :-)
Consider this piece of code:
s: UnicodeString;
s := '?? ?? ?? ?? ?? ?? ?? ????????????????????';
Memo1.Lines.Add(s);
and the same lines in C++ Builder:
UnicodeString s;
s = "?? ?? ?? ?? ?? ?? ?? ????????????????????";
Memo1->Lines->Add(s)...
Hi!
I also posted this question on the C++ Builder forum, but I would like to hear your opinion too. This forum has much larger user base, and it's the same IDE after all.
Here's the thing:
I've been using C++ Builder 2009 for the last couple of days trying to port one of my C++ Builder 2006...
Hi!
I've been using C++ Builder 2009 for the last couple of days trying to port one of my C++ Builder 2006 projects. The porting part went seamlessly. Had to change some parameter types for a couple of functions' calls due to the unicode support, but otherwise everything is great. I like this...
Thank you very much again TonyGroves.
That solved my problem.
I remember now that I used extern static, ... in C here and there, but I forgot about that.
Thanks a lot.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.