AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

[Optimieren] TStringList

Ein Thema von _rEdoX · begonnen am 14. Sep 2006 · letzter Beitrag vom 14. Sep 2006
 
Benutzerbild von negaH
negaH

Registriert seit: 25. Jun 2003
Ort: Thüringen
2.950 Beiträge
 
#6

Re: [Optimieren] TStringList

  Alt 14. Sep 2006, 21:54
Delphi-Quellcode:
       
if table[x] = '0then
  table[x] := inttostr((ord(dat.text[i])));
ich gehe davon aus das Table[] als Table[Byte] of String deklariert wurde. Ändere die ab in

Delphi-Quellcode:
var
  table: array[char] of Char;

// table initalisiieren mit
FillChar(table, SizeOf(table), 0);

// in deiner Schleife nun

  x := plainText[I]; // x type Char
  if table[x] = #0 then
    table[x] := ordText[i];
damit optimierst du das IntToStr() weg, was sehr inperformant ist. In table[] stehen dann ASCII Zeichen die du wenn es nötig ist mit IntToStr(Ord(table[char(i)])) umwandeln kannst. Ich denke aber das das garnicht nötig sein wird.

Gruß Hagen
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:55 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz