It seems to work when I use a slightly more reasonable input, e.g.

   t=. 1000$'Now is the time for all goode men to come to the aid of the
party '
   6!:2 't -: (3!:2) zlib_uncompress zlib_compress (3!:1) t'
0.0140519

or even a less reasonable one:

     $t=. a.{~1e5?@$$a.
100000
   6!:2 't -: (3!:2) zlib_uncompress zlib_compress (3!:1) t'
6.45272
   $t=. a.{~1e6?@$$a.
1000000
   6!:2 't -: (3!:2) zlib_uncompress zlib_compress (3!:1) t'
69.181


On Wed, Sep 24, 2014 at 1:38 AM, Tikkanz <[email protected]> wrote:

> I think the approach taken is great.
> It "just works" in most instances because of the J fallback code.
> Where performance is an issue, installing the dll is easy - just follow the
> instructions in the readme.txt.
>
> load 'arc/zlib'
> t=: a. {~ 1e6 ?@$ 256
>
> timespacex 't -: zlib_decode_j_jzlib_ zlib_encode_j_jzlib_ t'
>
> 61.0344 2.12975e8
> timespacex 't -: zlib_uncompress zlib_compress t'
>
> 0.0403442 4.20006e6
>
>
>
>
> On Wed, Sep 24, 2014 at 4:33 PM, bill lam <[email protected]> wrote:
>
> > j code zlib was intended for writing png output for viewmat and
> > plot where data should be highly compressible and performance
> > will be acceptable.
> >
> >    t =. 1e4#a.
> >    6!:2 't -: zlib_decode_j_jzlib_ zlib_encode_j_jzlib_ t'
> > 54.398
> >
> >    t =. 1e6$a.
> >    6!:2 't -: zlib_decode_j_jzlib_ zlib_encode_j_jzlib_ t'
> > 32.8421
> >
> > --
> > regards,
> > ====================================================
> > GPG key 1024D/4434BAB3 2008-08-24
> > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to