Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!zaphod.mps.ohio-state.edu!uunet.ca!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: J on the HP95LX
Message-ID: <1992May13.152211.7786@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
References: <13226@umd5.umd.edu>
Date: Wed, 13 May 92 15:22:11 GMT
Lines: 51

J. Patrick Harrington writes:
 
>     For anyone who is running J on the HP95LX palmtop
> computer, there is indeed a solution to the slow response
> when running on battery power (and of course that's just
> why you wanted the HP95 in the first place). You will
> recall that the PC version of J runs fine when the HP95
> is plugged into an external power source, but on it's
> two AA cells, it slows by a factor of nine! The simplest
> things make it pause, and actual computations take many
> minutes. This is because on internal battery power the
> HP95 goes into a "Lite Sleep" mode, which saves battery
> power, and doesn't much bother most applications, but is
> a killer for computationally intensive programs like J.
>    ...
 
We have an alternative solution.  It turns out that the way the
J/PC session manager handles the keyboard fools the battery-saver
("Lite Sleep") logic into thinking that the user is typing on the
keyboard, even during compute-intensive operations like inverting
a matrix.  Our conjecture is that the HP95LX enters Lite Sleep mode
after some minutes of keyboard entry (among other things).  The following 
experiments conducted by E.E. McDonnell demonstrate this behaviour.  
("j /s" runs J without the session manager.)
 
> no. 6213271 filed 17.31.54  wed  6 may 1992
> from eem
> to   rhui
> subj timings on HP 95LX
>
>    m=.3 3$8 1 6  3 5 7  4 9 2
>    time=.6!:2
>    NB. Using ac plug power
>    time '%.m'
> 9.56044
>    NB. Using battery power
>    time '%.m'
> 95.1099
>    NB. Using battery power and j /s
>    time '%.m'
> 9.01099

The session manager will be revamped in this regard, to obviate the need
for disabling the "Lite Sleep" logic before running J.
 
(I am amused by this exotic bug.  A mere 3 years ago neither the hardware 
nor the software existed to have bugs like this.  Such is progress :-)

------------------------------------
Roger Hui, Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
Phone: (416) 925 6096;  Fax: (416) 488 7559
