There's a simple verb to display the internal representation of a object at
the end of the essay on J's internal representation at
https://code.jsoftware.com/wiki/User:Devon_McCormick/Data/JInternalRepresentation
.

On Thu, Jan 30, 2020 at 6:28 PM Raul Miller <[email protected]> wrote:

> 3!:3 y gives you a hex dump of y, including the array header.
>
> So, for example, you could inspect a "boolean" array for yourself:
>    3!:3]1 p: i.99
>
> Or: the "boolean" array type is represented as C bytes.
>
> (This is because bits are not addressable and for typical cases the
> consequence of a packed bit representation would be a significant
> performance penalty. Similarly, lapack can offer significant speed
> improvements in some cases which are difficult for the interpreter to
> identify speedily.)
>
> (That said, note also that "boolean" is a term which has gone
> significant linguistic drift. As a consequence, boolean operations,
> such as *. or +. (which are faithful to the original concept) do not
> necessarily produce what most people with computer or math training
> understand as boolean results.)
>
> Thanks,
>
> --
> Raul
>
> On Thu, Jan 30, 2020 at 4:28 PM 'Sergey Kamenev' via Programming
> <[email protected]> wrote:
> >
> > Hi!
> >
> > I read https://code.jsoftware.com/wiki/System/ReleaseNotes/J901.
> >
> > It says about improving the performance of Boolean arrays.
> > Is it due to the fact that it is stored in memory as bits, or as bytes,
> or still as integers?
> >
> > Sergey.
> > ----------------------------------------------------------------------
> > 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

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to