Recent

Author Topic: FastStrings package  (Read 5677 times)

CharlyTango

  • Full Member
  • ***
  • Posts: 178
FastStrings package
« on: October 22, 2013, 02:57:28 pm »
Hi Folks,

As an old Delphi programmer Lazarus looks very nice but what I'm lacking is the support of my well known component-libraries and packages.

One of them which i heavyly used ist FastStrings/FastStringFuncs which provides me a massive speed boost with string manipulation or search and replace in larger strings (namely html sources).

For test purposes I included FastStrings.pas into an empty project and compiled it.

..and found out that i have to mark the inline assembler sections with

Code: [Select]
{$ASMMODE intel}
asm

But afterwards i ran into the next problem -- at the Line

Code: [Select]
lea     ESI, ESI + 1
the compiler threw an error:
C:\Source\_shared\FastStrings.pas(294,26) Error: Invalid operand type

Regrettably I'm no assembler crack :-(

My questions are:

1) Has anyone ported the FastStrings/FastStringsFuncs to Lazarus?

2) Is there a similar Package for superfast string manipulation ?

3) or are such fast string functions already implemented in FPC and additional packages are not necessary any more?

Regards,
Karl
Lazarus stable, Win32/64

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: FastStrings package
« Reply #1 on: October 22, 2013, 05:03:24 pm »
Probably, you can replace it by "inc esi". or lea esi, [esi+1] or something, probably depends on context.

Note that faststrings is partially so fast because it simply skips a lot of stuff. (like supporting internationalization and MBCS), and in general very uncleanly programmed.

CharlyTango

  • Full Member
  • ***
  • Posts: 178
Re: FastStrings package
« Reply #2 on: October 23, 2013, 08:46:33 pm »
Thanks for your answer!

But... whick package shall i use? Do you know any Package which focuses on superfast string handling and is programmed cleanly ?

Regards
Lazarus stable, Win32/64

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: FastStrings package
« Reply #3 on: October 23, 2013, 09:33:01 pm »
But... whick package shall i use? Do you know any Package which focuses on superfast string handling and is programmed cleanly ?

It is called the "RTL" :-)

Graeme

  • Hero Member
  • *****
  • Posts: 1518
    • Graeme on the web
Re: FastStrings package
« Reply #4 on: October 24, 2013, 12:12:19 pm »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018