[fpc-pascal] Re: UnicodeString comparison performance

leledumbo leledumbo_cool at yahoo.co.id
Sat Jul 21 01:33:40 CEST 2012


I look at the generated code and in the direct one there's additional
overhead of decrementing the reference counter on each iteration. Here's
what the core code looks like:

Direct:
  leal  -56(%ebp),%eax
  call  fpc_unicodestr_decr_ref
  leal  -56(%ebp),%eax
  call  P$TEST_$$_GETSOMESTRING$$UNICODESTRING
  movl  -56(%ebp),%eax
  movl  $_$TEST$_Ld2,%edx
  call  fpc_unicodestr_compare_equal
  testl %eax,%eax

Indirect:
  leal  -16(%ebp),%eax
  call  P$TEST_$$_GETSOMESTRING$$UNICODESTRING
  movl  $_$TEST$_Ld2,%edx
  movl  -16(%ebp),%eax
  call  fpc_unicodestr_compare_equal
  testl %eax,%eax



--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/UnicodeString-comparison-performance-tp5710405p5710408.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list