I don't think we should be shooting for always. If you need a complex
1, for example, it can sometimes make sense to pre-generate a complex
1 to avoid conversion costs.

But using the most compact form does seem to be consistent with the
rest of the system.

Thanks,

-- 
Raul


On Fri, Dec 1, 2017 at 10:23 PM, Henry Rich <[email protected]> wrote:
> I see what's happening.  1"_ produces a Boolean, while 1: produces an
> integer.  In this case the Boolean is better.  I'm not sure whether it
> always would be; what do you think?
>
> Henry Rich
>
> On 12/1/2017 9:12 AM, Raul Miller wrote:
>>
>> Huh...
>>
>> I can reproduce that 10x speed difference:
>>
>>     timespacex 'c0 17'
>> 0.078233 2.01328e8
>>     timespacex 'c01 17'
>> 0.761976 1.61061e9
>>     c0
>> ,@((1 0 1 */ ])^:(]`(1"_)))
>>     c01
>> ,@((1 0 1 */ ])^:(]`1:))
>>
>> This seems bizarre.
>>
>> Thanks,
>>
>
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to