What? Delphi uses an OLD version of FastMove???

I just did a small test about the Move proc, use Delphi 2007/XE, compared with VC 2008 and ICC, and FPC(Lazarus), then the result DID shocked me: Lazarus was FASTER then Delphi!!!
So I viewed it's RTL Source, it uses FastMove code but wait, Delphi ALSO uses FastMove, and why the result was so different?

I added FastMove in the uses clause, and the result was as same as ICC did, I just have no words to say.....
From the System.pas, we know Delphi uses an OLD version of FastMove: Portions created by the initial developer are Copyright (C) 2002-2004, but the FastMove was updated in: 06-MAR-2006! We know RAD Studio was shipped in 2007, so WHY it uses the OLD one?
Hey, what are the guys' doing in CodeGear/Embarcadero?

Now I did not complain about the SHIT OPTIMIZATION of DCC, I just want to say: Pls pay much more attention on our Delphi!!! Thank U!
0
Guangyao
11/22/2011 10:25:52 AM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

18 Replies
1559 Views

Similar Articles

[PageSpeed] 15

> {quote:title=Guangyao Hu wrote:}{quote}
> From the System.pas, we know Delphi uses an OLD version of FastMove: Portions created by the initial developer are Copyright (C) 2002-2004, but the FastMove was updated in: 06-MAR-2006! We know RAD Studio was shipped in 2007, so WHY it uses the OLD one?

The fact is that the FastMove version used is x87 based, so that it will work on every Windows compatible hardware.
Not all still running CPUs have SSE2 instructions.

But this x87 version of Move() is not slow at all.
It is faster than a pure pascal version, or the older "rep movsd / rep movsb" asm version.
And it will be fast enough for most *real* use - there is no application which is doing only "moves".
Bottleneck will be somewhere else.

I've written some optimized version of the RTL for Delphi 6-7-2007.
You can take a look at http://synopse.info/forum/viewforum.php?id=6

> Now I did not complain about the SHIT OPTIMIZATION of DCC, I just want to say: Pls pay much more attention on our Delphi!!! Thank U!

Speed is not the main goal of Embarcadero team.
There are some worse part of the RTL (e.g. the IntToStr function implementation).
But Delphi applications tends to be fast and responsive on all hardware - if properly written, of course.
0
Arnaud
11/22/2011 12:33:33 PM
Guangyao Hu wrote:

> SHIT OPTIMIZATION

Is that some kind of artificial diarrhoea?

-- 
Rudy Velthuis

"How can I lose to such an idiot?"
 -- A shout from chessmaster Aaron Nimzovich (1886-1935)
0
Rudy
11/22/2011 12:43:52 PM
> {quote:title=Arnaud BOUCHEZ wrote:}{quote}
> > {quote:title=Guangyao Hu wrote:}{quote}
> > From the System.pas, we know Delphi uses an OLD version of FastMove: Portions created by the initial developer are Copyright (C) 2002-2004, but the FastMove was updated in: 06-MAR-2006! We know RAD Studio was shipped in 2007, so WHY it uses the OLD one?
> 
> The fact is that the FastMove version used is x87 based, so that it will work on every Windows compatible hardware.
> Not all still running CPUs have SSE2 instructions.
> 
> But this x87 version of Move() is not slow at all.
> It is faster than a pure pascal version, or the older "rep movsd / rep movsb" asm version.
> And it will be fast enough for most *real* use - there is no application which is doing only "moves".
> Bottleneck will be somewhere else.
> 
> I've written some optimized version of the RTL for Delphi 6-7-2007.
> You can take a look at http://synopse.info/forum/viewforum.php?id=6
> 
> > Now I did not complain about the SHIT OPTIMIZATION of DCC, I just want to say: Pls pay much more attention on our Delphi!!! Thank U!
> 
> Speed is not the main goal of Embarcadero team.
> There are some worse part of the RTL (e.g. the IntToStr function implementation).
> But Delphi applications tends to be fast and responsive on all hardware - if properly written, of course.

Delphi's compile configuration is not as good as VC, even as FPC, this make multi-platform support possible, so if the target platform is x86/64, then we could use the SSE2/3 implementation, just like FPC do.

Thank you for your information, it do benefit me a lot.

And 1 more question: How about the development of the FastCode project? Is it still in progress?

So sorry for my poor English.
0
Guangyao
11/22/2011 1:07:54 PM
> {quote:title=Rudy Velthuis (TeamB) wrote:}{quote}
> Guangyao Hu wrote:
> 
> > SHIT OPTIMIZATION
> 
> Is that some kind of artificial diarrhoea?
> 
> -- 
> Rudy Velthuis
> 
> "How can I lose to such an idiot?"
>  -- A shout from chessmaster Aaron Nimzovich (1886-1935)

Maybe this could describe how bad OPTIMIZATION the DCC did, do, and doing, just as we know.
0
Guangyao
11/22/2011 1:19:09 PM
Guangyao Hu wrote:

> > {quote:title=Rudy Velthuis (TeamB) wrote:}{quote}
> > Guangyao Hu wrote:
> > 
> > > SHIT OPTIMIZATION
> > 
> > Is that some kind of artificial diarrhoea?
>
> Maybe this could describe how bad OPTIMIZATION the DCC did, do, and
> doing, just as we know.

No, I don't think so. It didn't sound like it. It sounded like
optimized defecation.

-- 
Rudy Velthuis [TeamB]        http://rvelthuis.de

"War is fear cloaked in courage." -- General William Westmoreland
0
Rudy
11/22/2011 4:35:51 PM
<Guangyao Hu> wrote 
>> From the System.pas, we know Delphi uses an OLD version of
 FastMove: ... We know RAD Studio was shipped in 2007, so WHY
 it uses the OLD one?

<Arnaud BOUCHEZ> wrote
> The fact is that the FastMove version used is x87 based, so
 that it will work on every Windows compatible hardware.
 Not all still running CPUs have SSE2 instructions.
> ...
> Speed is not the main goal of Embarcadero team. ...

From my reading or recent posts in this forum, it seems to appear 
that minimizing executable program size is also not a main goal 
of the Embarcadero team.  So why cannot the team include in the 
compiler output multiple sections each optimized for different 
variations of the available features of both old and new hardware 
and OSs. 

I am not a fan of self modifying code, but I seem to remember that
the early Delphi or late TurboPascal would, on the its execution, 
change itself to accommodate either the 8087 or the S/W emulator.

--JohnH
0
John
11/22/2011 6:44:53 PM
> The fact is that the FastMove version used is x87 based, so that it will work on every Windows compatible hardware.
> Not all still running CPUs have SSE2 instructions.

SSE2 was introduced ten years ago. If you're still need supporting such an old hardware you probably should also use an old compiler as well to ensure compatibility with the OS you run on it - and I would be anyway very worried about how long it could still work before failing.

At least Delphi could introduce some switches to enable/disable certain instruction usage, because being compatible is nice, but when you lose too many advantages it becomes silly.
 
> Speed is not the main goal of Embarcadero team.

And the you ask yourself: "why use a native compiler if its code may be even slower than jitted one?". Hope the new developers will also develop better and faster code - and not viceversa.

> There are some worse part of the RTL (e.g. the IntToStr function implementation).

Well, nothing to be proud of...

> But Delphi applications tends to be fast and responsive on all hardware - if properly written, of course.

More or less... but if it loses too much ground to other tools that also offers other benefits, you ask yourself what kind of tool it aims to be.
0
Luigi
11/22/2011 10:31:54 PM
Luigi Sandon  писал(а) в своём письме Wed, 23 Nov 2011 02:31:54 +0400:

> SSE2 was introduced ten years ago. If you're still need supporting such  
> an old hardware you probably should also use an old compiler as well to  
> ensure compatibility with the OS you run on it - and I would be anyway  
> very worried about how long it could still work before failing.

i still have Celeron3 850MHz box. It was nice for win2000 and still  
capable for winXP.
I even tried win7 rc on it, and if not for lack of RAM i would work okay  
after loaded

Another point in fixing compiler into SSE2 - is removal of x87 and with  
speed enhancements it would require to remove Extended type, as they did  
in x64 compiler.
Break compatibility for quite doubtful benefit of SSE 2 in  
database-centric programs?

> At least Delphi could introduce some switches to enable/disable certain  
> instruction usage,

FastCode project existed before Delphi reused it. If those 10% were  
required to someone, he probably could download and install Fastcode  
newest build manually.


-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
0
Dmitry
11/23/2011 5:04:26 AM
> {quote:title=Luigi Sandon wrote:}{quote}
> And the you ask yourself: "why use a native compiler if its code may be even slower than jitted one?". Hope the new developers will also develop better and faster code - and not viceversa.

Embarcadero is just following the Wirth's law slower than others:
  "Software is getting slower more rapidly than hardware becomes faster"

Speed is only a matter of compiler for mathematical computing intensive tasks.
Most of the time, in *real* apps (like business apps), the main speed issue is more the framework size (and the number of dll invoked), memory consumption, and general design (e.g. how caching and SQL are written).

Delphi, Java or .Net can do slow apps.
Delphi, Java or .Net can do fast apps.

You can do small and fast stand-alone apps with Delphi, running from Windows 2000 to Windows 8.
It is not possible with Java nor .Net.

This is the main difference IMHO with native code and JIT - about memory use, ease of distribution and no need of an external runtime framework.

For instance, most of our tools (like SynProject documentation or SynDBExplorer tool) are stand-alone, but powerful.
SynDBExplorer is able to connect to databases with no installation: the same written in .Net would make a smaller executable in size, but will be slower when working with huge amount of data (millions of rows), need additional requirements for database access (e.g. native Oracle), and will consume much more memory.
0
Arnaud
11/23/2011 7:25:52 AM
> Delphi, Java or .Net can do slow apps.
> Delphi, Java or .Net can do fast apps.

Reminds me of a Coluche pun about equality... ;)

Eric
0
Eric
11/23/2011 8:51:50 AM
For the matter I still run a Pentium II machine for fun, but that doesn't mean I need Delphi XE2 to support it, because noone of my customers is so crazy to run production software on such a machine. Retrocomputing may be nice hobby, but not business. And even if I'd need to support for some reason an old machine I would use old tool as well - there's less overhead in old frameworks as well.

> Another point in fixing compiler into SSE2 - is removal of x87 and with  
> speed enhancements it would require to remove Extended type, as they did  
> in x64 compiler.

Supporting SSE2, SSE3 and beyond doesn't mean x87 code generation _must_ be removed. That's just a choice of the compiler developers, as long as processors can still handle x87 code and registers.

> Break compatibility for quite doubtful benefit of SSE 2 in  
> database-centric programs?

What's a database centric program? There are very, very different kind of applications that use a database to store and manage data. Some would benefit from SSE, other may prefer extended precision, and some not use floating point arithmetic at all, but still need performance and take advantage of latest processors and not those of ten years ago.
 
> FastCode project existed before Delphi reused it. If those 10% were  
> required to someone, he probably could download and install Fastcode  
> newest build manually.

The problem is that working with Delphi became more and more a chase to put many different pieces together to obtain performance it should deliver out of the box, especially at that price. If you sell a tool that delivers more or less the same features and performance of those costing far less, you have really no competitive advantage. Selling it just to nostalgic developers and those too lazy to learn a new language and framework doesn't look a sound  business model.
0
Luigi
11/23/2011 9:53:24 AM
just swallow it and forget it!
0
smelly
11/23/2011 10:14:08 AM
Luigi Sandon  писал(а) в своём письме Wed, 23 Nov 2011 13:53:24 +0400:

> to support for some reason an old machine I would use old tool as well -  
> there's less overhead in old frameworks as well.

There is more overhead in using two IDEs and two sets of features and  
probably same codebase with $IfDefs for differnt IDE versions.
I'd better stick with newer framework.

>> Another point in fixing compiler into SSE2 - is removal of x87 and with
>> speed enhancements it would require to remove Extended type, as they did
>> in x64 compiler.
>
> Supporting SSE2, SSE3 and beyond doesn't mean x87 code generation _must_  
> be removed. That's just a choice of the compiler developers, as long as  
> processors can still handle x87 code and registers.

Given that SSE2 FP is much faster, changing move for 10% speedup and not  
changed FP for much more speedup would be inconsistent.

>> FastCode project existed before Delphi reused it. If those 10% were
>> required to someone, he probably could download and install Fastcode
>> newest build manually.
>
> The problem is that working with Delphi became more and more a chase to  
> put many different pieces together to obtain performance it should  
> deliver out of the box, especially at that price.

Price is awful.
However about 10%...
When u aim at 0,9; 0,99,; 0,999 - each next digit gives less bonus but  
costs more effort/price.

So i found nothing strange that to squeeze last bits of performance u need  
to assemble pieces together.

The very heap management - there is FastMM, ScaleMM, NexusMM, Intel TBB  
MM...
Either u don't care about tail percents, or you pick the piece that fits  
your particuar application.

> If you sell a tool that delivers more or less the same features and  
> performance of those costing far less, you have really no competitive  
> advantage.

10% speed... in one certain procedure that is matginally used in usual OOP  
program...
it would make a huge benefit in generic-purpose advertisements, really.

> Selling it just to nostalgic developers and those too lazy to learn a  
> new language and framework doesn't look a sound business model.

Incorporating any good 3rd-party library and killing 3rd-party market  
Microsoft-way does not sounds sound too.
Either you have plenty of additions - and bother to choose from them, or  
you have simplicity of the only true way.

-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
0
Dmitry
11/23/2011 11:41:25 AM
smelly jelly wrote:

> just swallow it and forget it!

You may swallow such things. I won't.

-- 
Rudy Velthuis

"There is a rumour going around that I have found God. I think 
 this is unlikely because I have enough difficulty finding my 
 keys, and there is empirical evidence that they exist."
 -- Terry Pratchett
0
Rudy
11/23/2011 11:01:27 PM
> {quote:title=Eric Grange wrote:}{quote}
> Reminds me of a Coluche pun about equality... ;)
> 
> Eric

Or

ALL ANIMALS ARE EQUAL 
BUT SOME ANIMALS ARE MORE EQUAL THAN OTHERS 

http://www.george-orwell.org/Animal_Farm/9.html
0
Arnaud
11/25/2011 1:13:15 PM
Arnaud BOUCHEZ  писал(а) в своём письме Fri, 25 Nov 2011 17:13:15 +0400:

> ALL ANIMALS ARE EQUAL
> BUT SOME ANIMALS ARE MORE EQUAL THAN OTHERS

some by reference and others by hash (or by value) ?

-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
0
Dmitry
11/25/2011 8:50:44 PM
Arnaud BOUCHEZ  писал(а) в своём письме Fri, 25 Nov 2011 17:13:15 +0400:

> ALL ANIMALS ARE EQUAL
> BUT SOME ANIMALS ARE MORE EQUAL THAN OTHERS

some by reference and others by hash (or by value) ?

-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
0
Dmitry
11/25/2011 8:50:45 PM
What kind of noob would use the badly written crap that Delphi comes with anyway?

There are good libraries out there for block moves, Intel & AMD have them, or you can write your own asm. You should be more worried about the crap parts of Delphi that you CAN'T do anything about, and believe me, the compiler is bad. For the rest, you don't need to be babysitted.
0
fia
12/2/2011 6:57:31 PM
Reply:

Similar Artilces:

HELP! Trying to Complie old Delphi program on any version of Delphi
Hey everyone I'm new to the programming world and unfortunately I have come across a big problem that I will hope I can get some help with. I have a program that was apparently created using delphi 3 and then finished using delphi 4 with some additional parts added later. I have found copies of amost every version of delphi ever made and installed them on my pc and attempted to compile this program in question. Unfortuantely I have yet to get it to compile without a few thousand error messages and I am st uck between a rock and a hard place. I know very little of Delphi programming, let a...

Virus use old Delphi versions to spread
Hello http://www.viruslist.com/en/weblog?weblogid=208187826 Martin Martin Diehl wrote: > Hello > > http://www.viruslist.com/en/weblog?weblogid=208187826 > > Martin Hmmm, disturbing. I have Delphi 6 there is a sysconst.bak in \Lib. Furthermore, it is the only .bak file in C:\Program Files\Borland\Delphi6\* sysconst.bak Location: C:\Program Files\Borland\Delphi6\Lib Size: 11.2 KB (11,491 bytes) Size on disk: 12.0 KB (12,288 bytes) Created: Tuesday, 22 May 2001, 4:00:00 PM Modified: Friday, 15 February 2002, 1:02:00 PM sysconst.dcu Location:...

Is it dangerous to still using old Delphi version ?
Hello, I like to use Delphi 7.0 alot but is it dangerous to still using an old version like this ? Is there a huge compiler enhancement in Delphi 2007 and 2009 versions that makes me must upgrade ? Thanks for advice I would like to say "no" (as I am a D6 personal user), but if you need such improvement as GENERICS.... (note that GENERICS just ain't PASCAL)... DH isaac sam wrote: > I like to use Delphi 7.0 alot but is it dangerous to > still using an old version like this ? If by dangerous you mean that your programs may not run correctly on re...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Which Delphi version do you use?
Since we seem to be in a mood to take surveys in here, I'd like to pose the following questions. Which version of Delphi do you use for "current" projects? Which is the most recent version have you purchased? If these are different, why are you not using the latest version? Let me be the first to answer my own questions. On 10/01/2014 9:20 AM, John Furlong wrote: > Since we seem to be in a mood to take surveys in here, I'd like to pose > the following questions. > > Which version of Delphi do you use for "current" projects? XE2 >...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

Will Delphi XE2 co-exist with other Delphi versions ?
Can I install it on a machine that's got other Delphi's on it ? Lut Mentz wrote: > Can I install it on a machine that's got other Delphi's on it ? Yes. As far as I know that has always been the case. -- -Mike (TeamB) Lut Mentz wrote: > Can I install it on a machine that's got other Delphi's on it ? Yes -- it has always been the case that the new version co-exists peacefully with all the older ones. -- Nick Hodges -- Product Development Manager Gateway Ticketing Systems http://www.gatewayticketing.com > {quote:title=Mike Williams ...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

MOVED: Use Delphi XE TLB importer in Delphi 2007?
....to the ActiveX group: https://forums.embarcadero.com/thread.jspa?threadID=47170 -- Craig Stuntz · Vertex Systems Corp. · Columbus, OH Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz/ ...

Availability of updates for old Delphi versions
Hi, I need all ever released updates for Delphi 5 and 6 Professional. Where can I (legally) get them? I tried Registered User Downloads section on Embarcadero website, but they have there updates only for Delphi 7 onwards. Thanks in advance! -- Ivo Bauer On 02.09.2010 16:18, Ivo Bauer wrote: > Hi, > > I need all ever released updates for Delphi 5 and 6 Professional. Where can > I (legally) get them? I tried Registered User Downloads section on > Embarcadero website, but they have there updates only for Delphi 7 onwards. > > Thanks in advance! > T...

Debugging in Delphi XE2 using another Delphi BDS process as host
Hi I've been using delphi a long time And I always had the possibility of debbuging Packages using another Delphi process as host. This is very useful to test the design-time side of packages. Now with XE 2 I can whether running with options - Debugger - Host Application or Attach to process Any ideas? Thanks Plp Pedro wrote: > Now with XE 2 I can whether running with options - Debugger - Host > Application or Attach to process What exactly are you having trouble with? Error messages, unexpected behavior, etc. -- Remy Lebeau (TeamB) Hi Remy ...

Web resources about - What? Delphi uses an OLD version of FastMove??? - embarcadero.delphi.non-tech

Home Games - Games - allgame
Software in this genre is designed for personal use, to boost productivity, help manage a schedule, or assist in a particular project or activity. ...

Revisit.
Celebrity, Sex, Fashion for Women. Without Airbrushing.

Most popular houses for sale in Cheshire - Cheshire houses for sale - Homes&Property
Homes&Property > p1 > Find most popular houses for sale in Cheshire with the UK's leading online property market resource, and contact Cheshire ...

Frozen: Finally, a Disney Prince Who's a Disingenuous Dickweed
There are a lot of things to like about Disney's latest hit Frozen: the major relationship in the film concerns two sisters, it doesn't chase ...

Most popular houses to rent in SE5 - SE5 houses to rent - Homes&Property
Homes&Property > Find most popular houses to rent in SE5 with the UK's leading online property market resource, and contact SE5 estate agents ...

Commercial agents in Cheshire, Cheshire commercial agents - Homes&Property
Homes&Property > Use Zoopla's UK commercial agents directory to find commercial agents in Cheshire. View Cheshire commercial agents locations ...

Resources last updated: 12/15/2015 9:53:52 PM