Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Issue 660455: Fast case conversion for ascii strings. (Closed)

Created:
10 years, 9 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Fast case conversion for ascii strings. Committed: http://code.google.com/p/v8/source/detail?r=4011

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -9 lines) Patch
M src/runtime.cc View 2 chunks +76 lines, -9 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Vitaly Repeshko
10 years, 9 months ago (2010-03-03 16:14:26 UTC) #1
antonm
LGTM http://codereview.chromium.org/660455/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/660455/diff/1/2#newcode4102 src/runtime.cc:4102: static bool ConvertAscii(char* dst, char* src, int length) ...
10 years, 9 months ago (2010-03-03 16:20:11 UTC) #2
Vitaly Repeshko
10 years, 9 months ago (2010-03-03 16:40:46 UTC) #3
Thanks! Submitted.


-- Vitaly

http://codereview.chromium.org/660455/diff/1/2
File src/runtime.cc (right):

http://codereview.chromium.org/660455/diff/1/2#newcode4102
src/runtime.cc:4102: static bool ConvertAscii(char* dst, char* src, int length)
{
On 2010/03/03 16:20:11, antonm wrote:
> just curious if this and below loops could be sped up with unfolding.

Performance tuning is poisonous :)

GCC 4.2.4 with -O3 produces
  c0:   0f b6 54 29 0b          movzbl 0xb(%ecx,%ebp,1),%edx
  c5:   8d 42 bf                lea    -0x41(%edx),%eax
  c8:   3c 19                   cmp    $0x19,%al
  ca:   77 08                   ja     d4
  cc:   83 c2 20                add    $0x20,%edx
  cf:   c6 44 24 17 01          movb   $0x1,0x17(%esp)
  d4:   88 54 39 0b             mov    %dl,0xb(%ecx,%edi,1)
  d8:   83 c1 01                add    $0x1,%ecx
  db:   39 f1                   cmp    %esi,%ecx
  dd:   75 e1                   jne    c0
so, yeah, it can benefit from manual unrolling. My plan is to do a pass with
lower-level optimizations like this later.

Powered by Google App Engine
This is Rietveld 408576698