Chris Burke wrote:
The rpl3a method was essentially that used in J504, but replaced in J6 with a slower method that works with unicode, e.g.

   [A =: 3 2$'aBc' , (u:39321 28207), 'E'
aB
c香
港E

   toupper A
AB
C香
港E

   (((65,.97)+"0 _ i.26){a.)rpl3a A
|index error: rpl3a
|       ((x1,a.){~(x0,a.)i.])y

On the other hand, a 40x hit is quite a lot. It would be good to speed up toupper and still work with unicode.


The toupper/tolower in script J602 does not use the special code for p {~ q i. ] so that it did not fail for unicode. As Roger promised the bug on unicode will fixed in the next beta, toupper/tolower may become faster if it use the that special code. Alternatively providing two different branches after checking 3!:0 should make all ascii argument faster. eg.

toupper=: [EMAIL PROTECTED](2~:3!:0)

--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to