Reverse a list

Ali Lloyd ali at runrev.com
Tue Feb 10 16:28:39 CET 2015


> Which v7 build is that?  Is it one we have or one coming up?

I've just submitted the pull request so once it's reviewed it will be
merged and appear in the next build, so hopefully 7.0.2 RC 3.

> Does LC 7 now do character references in constant (albeit a bit slower)
time? Or linear? Or...

In theory it should, yes. When you get char x of a native string, as long
as the engine remembers that it is native, (which was fixed for a few
missing cases in bug 14504), it will act as if you used the codeunit chunk
instead, with the corresponding benefit of constant-time access. Indeed
this should also work for strings that the engine is storing as utf-16
which contain no combining characters or surrogate pairs.

On 10 February 2015 at 15:11, Mike Bonner <bonnmike at gmail.com> wrote:

> Thanks Ali!
>
> On Tue, Feb 10, 2015 at 8:10 AM, Mike Bonner <bonnmike at gmail.com> wrote:
>
> > Mike K, are you wrapping the inserts in a begin/commit block?  It makes a
> > HUGE difference in speed. (otherwise, each is a separate transaction with
> > all the overhead.  If wrapped, its a single transaction, and so much
> > faster.
> >
> > On Tue, Feb 10, 2015 at 7:36 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
> >
> >> Yay, that's great news. Does LC 7 now do character references in
> constant
> >> (albeit a bit slower) time? Or linear? Or...
> >>
> >> On Tue, Feb 10, 2015 at 4:50 AM, Ali Lloyd <ali at runrev.com> wrote:
> >>
> >> > Apologies - hit send too early.
> >> >
> >> >
> >> > 6.7.1
> >> >
> >> > There are 2931 lines in tstart
> >> >
> >> > There are now 14655 lines in tstart
> >> >
> >> > revers(ta) took 427 ms
> >> >
> >> > qrevers(ta) took 6 ms
> >> >
> >> > Output OK
> >> >
> >> > krevers(ta) took 412 ms
> >> >
> >> > Output OK
> >> >
> >> >
> >> > 7.0.2 + bugfix
> >> >
> >> > There are 2931 lines in tstart
> >> >
> >> > There are now 14655 lines in tstart
> >> >
> >> > revers(ta) took 142 ms
> >> >
> >> > qrevers(ta) took 32 ms
> >> >
> >> > Output OK
> >> >
> >> > krevers(ta) took 258 ms
> >> >
> >> > Output OK
> >> >
> >> > On 10 February 2015 at 04:10, Kay C Lan <lan.kc.macmail at gmail.com>
> >> wrote:
> >> >
> >> > > On Tue, Feb 10, 2015 at 11:58 AM, Geoff Canyon <gcanyon at gmail.com>
> >> > wrote:
> >> > >
> >> > > > It seems that what we've lost with unicode/7 is the speed of
> >> character
> >> > > > references.
> >> > > >
> >> > >
> >> > > See Ali Lloyd's earlier response that the LC team have been watching
> >> this
> >> > > tread and it's clear that 'inefficient code' has been revealed. The
> LC
> >> > team
> >> > > are working on it and believe that for none Unicode chunking LC 7
> >> should
> >> > be
> >> > > as fast as LC 6. There will be some slow down when Unicode is
> >> involved.
> >> > > _______________________________________________
> >> > > use-livecode mailing list
> >> > > use-livecode at lists.runrev.com
> >> > > Please visit this url to subscribe, unsubscribe and manage your
> >> > > subscription preferences:
> >> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >> > >
> >> > _______________________________________________
> >> > use-livecode mailing list
> >> > use-livecode at lists.runrev.com
> >> > Please visit this url to subscribe, unsubscribe and manage your
> >> > subscription preferences:
> >> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >> >
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list