Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-02

FPC 3.0 slow strings

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Maciej Izak

Hi!

I am active user of mORMot and Zeos, I'd like to forward here important message from Google+:

https://plus.google.com/+ABouchez/posts/eGyvNBsrM9b

Any chance to improve this? :

Original message (author: A. Bouchez):

FPC 3.0 Strings are SLOW...
Did you experience this? After introducing of code pages to the String process, we discovered a huge ://wiki.freepascal.org/FPC_Unicode_support is confusing... We were not able to find a compilation mode in which the behavior was close to Delphi. For instance, the code page of the string constants in source code are broken. Or in case of string comparison, RawByteString are converted to the current system code page, so are dead slow, and broke most of existing code. We had some discussion with ZEOS authors, and they are as concerned as we are. See http://synopse.info/forum/viewtopic.php?pid=19498#p19498 The FPC RTL introduced clearly some performance regressions. A lot of hidden charset conversion is done at runtime, for no benefit, and breaking all code expectations.

Best regards, Maciej Izak

Reply by email

Jonas Maebe
to Maciej Izak

Maciej Izak wrote on Tue, 23 Feb 2016:

Show quoted text 6 lines
I am active user of mORMot and Zeos, I'd like to forward here important message from Google+: https://plus.google.com/+ABouchez/posts/eGyvNBsrM9b Any chance to improve this? :

If there are concrete questions, or points demonstrated by self-contained example programs: possibly. It's not possible to address a general rant about how X does not work, Y in general is slow, or Z is confusing.

Jonas

Reply by email

Michael Van Canneyt
to Maciej Izak: Hi! I am active user of mORMot and Zeos, I'd like to forward here important message from…
Maciej Izak wrote 16 lines
Hi! I am active user of mORMot and Zeos, I'd like to forward here important message from Google+: https://plus.google.com/+ABouchez/posts/eGyvNBsrM9b Any chance to improve this? : Original message (author: A. Bouchez): FPC 3.0 Strings are SLOW... Did you experience this? After introducing of code pages to the String process, we discovered a huge slowdown at execution. http://wiki.freepascal.org/FPC_Unicode_support is confusing... We were not able to find a compilation mode in which the behavior was close to Delphi.

Define 'close to Delphi', because what exactly do you expect ? The implementation, to our knowledge, is Delphi compatible.

(except that in recent Delphis, string = widestring)

Show quoted text 8 lines
For instance, the code page of the string constants in source code are broken. Or in case of string comparison, RawByteString are converted to the current system code page, so are dead slow, and broke most of existing code. We had some discussion with ZEOS authors, and they are as concerned as we are. See http://synopse.info/forum/viewtopic.php?pid=19498#p19498 The FPC RTL introduced clearly some performance regressions. A lot of hidden charset conversion is done at runtime, for no benefit, and breaking all code expectations.

This is definitely something to take into account.

But we cannot simply work out of the blue:

Please submit bug reports with simple examples of cases where you think unnecessary code conversions are done.

Michael.

Reply by email