Sign in Join

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

Mailing lists / fpc-pascal / 2013-03

optimisation v2.2.2

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

John Lee

I'm stuck with v2.2.2 because I have units from that version w/o source code, tho' not sure whether later fpcs would be any better? Any performance improvements made?

I have a program that does quite a bit of processing on xml strings (eg using str functions such as pos, npos,posex) that occur every 1 sec. These strings are quite long eg 5000 bytes or so and I have a short window to process them and do other stuff.

I've tried compiling with -O3 on strutils and main program to minimise the time taken for string stuff (running xp, win32 on a 10 year old laptop, 1.4Ghz). This doesn't seem to make much/any difference. There used to be keyhole optimising in fpc but don't see that in v2.2.2.

What about using -Oppentium3 or -Oppentium4? - they don't seem to make any difference either.

Anyone any ideas/comments re how to speed up strings?

John

Reply by email

leledumbo
to John Lee

FPC optimizations have never been aggressive, despite the trunk has several new optimizations with -O4. Since you're stuck with 2.2.2, and your problem is on string operation*, I don't think there's anything else you can do. Note that those -O thing won't suddenly boost your code, there are many factors affecting it. It could be your code, the compiler, or anything else.

*: in case your guess is right that the bottleneck is on the string operation

There used to be keyhole optimising in fpc but don't see that in v2.2.2

keyhole? Did you mean peephole? I don't know whether it exists in 2.2.2, but it does exist. It works only on x86 AFAIK and still, you won't get much difference either (it does optimize, but the factor won't be great)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/optimisation-v2-2-2-tp5713255p5713257.html Sent from the Free Pascal - General mailing list .

Reply by email