Array#nitems ã¯nilã§ãªã„è¦ç´ ã‚’æ•°ãˆã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ãŒã€ãƒ–ãƒãƒƒã‚¯ã‚’
与ãˆãŸå ´åˆã¯ãƒ–ãƒãƒƒã‚¯è©•ä¾¡å€¤ãŒçœŸã‚’è¿”ã™ã‚‚ã®ã‚’æ•°ãˆã‚‹ã€ã¨ã„ã†ä»•æ§˜ãŒ
1.9ã§è¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚
 ã—ã‹ã—ã€ã“ã‚Œã¯ãƒ–ãƒãƒƒã‚¯ãªã—ã®å ´åˆã¨ã®é–¢é€£ãŒä»Šã²ã¨ã¤è–„ãã€ã‹ã¤ã€
後ã‹ã‚‰ã§ã㟠Enumerable#count {} ã¨é‡è¤‡ã—ã¾ã™ã€‚速度ã®ãŸã‚ã«
Array#count を用æ„ã™ã‚Œã°ä¸è¦ã ã¨æ€ã†ã®ã§ã™ãŒã€ã„ã‹ãŒã§ã—ょã†ã‹ã€‚
From: “Akinori MUSHA” [email protected]
Subject: [ruby-dev:34676] removing Array#nitems {}
Date: Tue, 13 May 2008 18:06:03 +0900
e$B!!e(BArray#nitems e$B$Oe(Bnile$B$G$J$$MWAG$r?t$($k%a%=%C%I$G$9$,!“%V%m%C%/$re(B
e$BM?$($?>l9g$O%V%m%C%/I>2ACM$,??$rJV$9$b$N$r?t$($k!”$H$$$&;EMM$,e(B
1.9e$B$GDI2C$5$l$^$7$?!#e(B
e$B:G=i!"$J$s$G$@$m$&$H;W$$$^$7$?!#e(B
e$B!!$7$+$7!“$3$l$O%V%m%C%/$J$7$N>l9g$H$N4XO”$,:#$R$H$DGv$/!"$+$D!“e(B
e$B8e$+$i$G$-$?e(B Enumerable#count {} e$B$H=EJ#$7$^$9!#B.EY$N$?$a$Ke(B
Array#count e$B$rMQ0U$9$l$PITMW$@$H;W$&$N$G$9$,!”$$$+$,$G$7$g$&$+!#e(B
e$BF10U$7$^$9!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:34676] removing Array#nitems {}”
on Tue, 13 May 2008 18:06:03 +0900, “Akinori MUSHA”
[email protected] writes:
|e$B!!e(BArray#nitems e$B$Oe(Bnile$B$G$J$$MWAG$r?t$($k%a%=%C%I$G$9$,!“%V%m%C%/$re(B
|e$BM?$($?>l9g$O%V%m%C%/I>2ACM$,??$rJV$9$b$N$r?t$($k!”$H$$$&;EMM$,e(B
|1.9e$B$GDI2C$5$l$^$7$?!#e(B
|
|e$B!!$7$+$7!“$3$l$O%V%m%C%/$J$7$N>l9g$H$N4XO”$,:#$R$H$DGv$/!"$+$D!“e(B
|e$B8e$+$i$G$-$?e(B Enumerable#count {} e$B$H=EJ#$7$^$9!#B.EY$N$?$a$Ke(B
|Array#count e$B$rMQ0U$9$l$PITMW$@$H;W$&$N$G$9$,!”$$$+$,$G$7$g$&$+!#e(B
e$B3NG’$G$9$,!"$3$N!V$$$+$,$G$7$g$&$+!W$Oe(B
- nitemse$B$r:o=|e(B
- nitemse$B$,%V%m%C%/$r<u$1IU$1$k$OI,MW$J$$e(B
e$B$N$$$:$l$G$7$g$&$+!#e(B
At Wed, 14 May 2008 12:49:13 +0900,
matz wrote:
In message “Re: [ruby-dev:34676] removing Array#nitems {}”
on Tue, 13 May 2008 18:06:03 +0900, “Akinori MUSHA” [email protected] writes:
| Array#nitems ã¯nilã§ãªã„è¦ç´ ã‚’æ•°ãˆã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ãŒã€ãƒ–ãƒãƒƒã‚¯ã‚’
|与ãˆãŸå ´åˆã¯ãƒ–ãƒãƒƒã‚¯è©•ä¾¡å€¤ãŒçœŸã‚’è¿”ã™ã‚‚ã®ã‚’æ•°ãˆã‚‹ã€ã¨ã„ã†ä»•æ§˜ãŒ
|1.9ã§è¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚
|
| ã—ã‹ã—ã€ã“ã‚Œã¯ãƒ–ãƒãƒƒã‚¯ãªã—ã®å ´åˆã¨ã®é–¢é€£ãŒä»Šã²ã¨ã¤è–„ãã€ã‹ã¤ã€
|後ã‹ã‚‰ã§ã㟠Enumerable#count {} ã¨é‡è¤‡ã—ã¾ã™ã€‚速度ã®ãŸã‚ã«
|Array#count を用æ„ã™ã‚Œã°ä¸è¦ã ã¨æ€ã†ã®ã§ã™ãŒã€ã„ã‹ãŒã§ã—ょã†ã‹ã€‚
 Array#count ã¯å…ˆã»ã©å…¥ã‚Œã¾ã—ãŸã€‚
確èªã§ã™ãŒã€ã“ã®ã€Œã„ã‹ãŒã§ã—ょã†ã‹ã€ã¯
- nitemsを削除
- nitemsãŒãƒ–ãƒãƒƒã‚¯ã‚’å—ã‘付ã‘ã‚‹ã¯å¿…è¦ãªã„
 後者ã§ã™ã€‚
 元㮠Array#nitem ã®ä½¿ã„é“ã‚‚ã‚ã¾ã‚Šæ€ã„ã¤ã‹ãªã„ã®ã§ã€ 1.9 ã‹ã‚‰ã¯
消ã—ã¦ã‚‚ã„ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。↓ã“ã‚“ãªè©±ã‚‚。
http://jp.rubyist.net/magazine/?0021-Hotlinks
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:34688] Re: removing Array#nitems {}”
on Wed, 14 May 2008 15:03:31 +0900, “Akinori MUSHA”
[email protected] writes:
|e$B!!e(BArray#count e$B$O@h$[$IF~$l$^$7$?!#e(B
|
|> e$B3NG’$G$9$,!“$3$N!V$$$+$,$G$7$g$&$+!W$Oe(B
|>
|> * nitemse$B$r:o=|e(B
|> * nitemse$B$,%V%m%C%/$r<u$1IU$1$k$OI,MW$J$$e(B
|
|e$B!!8e<T$G$9!#e(B
|
|e$B!!85$Ne(B Array#nitem e$B$N;H$$F;$b$”$^$j;W$$$D$+$J$$$N$G!“e(B 1.9 e$B$+$i$Oe(B
|e$B>C$7$F$b$$$$$+$b$7$l$^$;$s!#”-$3$s$JOC$b!#e(B
|
| http://jp.rubyist.net/magazine/?0021-Hotlinks
e$B$+$o$$$=$&$Je(Bnitemse$B!#@8$_$N?F$K$^$G$=$s$JIw$K;W$o$l$F$k$J$s$Fe(B(e$B>Pe(B
e$B$I$&$7$h!<$+$J$"!#e(B
e$B$1$$$8$e!w$$$7$D$+$G$9e(B.
In [ruby-dev :34689 ] the message: "[ruby-dev:34689] Re: removing
Array#nitems {} ", on May/14 16:11(JST) Yukihiro M. writes:
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
|e$B!!85$Ne(B Array#nitem e$B$N;H$$F;$b$"$^$j;W$$$D$+$J$$$N$G!“e(B 1.9 e$B$+$i$Oe(B
|e$B>C$7$F$b$$$$$+$b$7$l$^$;$s!#”-$3$s$JOC$b!#e(B
| http://jp.rubyist.net/magazine/?0021-Hotlinks
e$B$+$o$$$=$&$Je(Bnitemse$B!#@8$_$N?F$K$^$G$=$s$JIw$K;W$o$l$F$k$J$s$Fe(B(e$B>Pe(B
e$B$I$&$7$h!<$+$J$"!#e(B
e$B;d$N8}$+$i$O$H$F$b:o=|$7$F$/$@$5$$$H$O8@$($J$$$G$9$,e(B(^^;;
__
---------------------------------------------------->> e$B@PDMe(B
e$B7=<ye(B <<—
---------------------------------->> e-mail: [email protected] <<—
At Wed, 14 May 2008 16:43:02 +0900,
石塚åœæ¨¹ wrote:
ã¾ã¤ã‚‚㨠ゆãã²ã‚ã§ã™
(snip)
ã‹ã‚ã„ãã†ãªnitems。生ã¿ã®è¦ªã«ã¾ã§ãã‚“ãªé¢¨ã«æ€ã‚ã‚Œã¦ã‚‹ãªã‚“ã¦(笑
ã©ã†ã—よーã‹ãªã‚。
ç§ã®å£ã‹ã‚‰ã¯ã¨ã¦ã‚‚削除ã—ã¦ãã ã•ã„ã¨ã¯è¨€ãˆãªã„ã§ã™ãŒ(^^;;
 1.8ã¸ã®ãƒãƒƒã‚¯ãƒãƒ¼ãƒˆã¯å–り消ã—ã¾ã—ãŸã€‚Array#countも用æ„ã—ãŸã®ã§
ã‚ã¨ã¯ä¸€å£°ã‚’å¾…ã¤ã®ã¿ã§ã™ã€‚
 å対ãŒãªã‘ã‚Œã°ã€ã„ãšã‚Œã²ã£ãã‚Šã¨æ¶ˆã—ã¦ãŠãã¾ã™ã。
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:34708] Re: removing Array#nitems {}”
on Thu, 15 May 2008 01:15:30 +0900, “Akinori MUSHA”
[email protected] writes:
|> >e$B$+$o$$$=$&$Je(Bnitemse$B!#@8$$N?F$K$^$G$=$s$JIw$K;W$o$l$F$k$J$s$Fe(B(e$B>Pe(B
|> >e$B$I$&$7$h!<$+$J$“!#e(B
|>
|> e$B;d$N8}$+$i$O$H$F$b:o=|$7$F$/$@$5$$$H$O8@$($J$$$G$9$,e(B(^^;;
|
|e$B!!e(B1.8e$B$X$N%P%C%/%]!<%H$O<h$j>C$7$^$7$?!#e(BArray#counte$B$bMQ0U$7$?$N$Ge(B
|e$B$”$H$O0l@<$rBT$D$N$$G$9!#e(B
|
|e$B!!H?BP$,$J$1$l$P!"$$$:$l$R$C$=$j$H>C$7$F$*$-$^$9$M!#e(B
e$B$(!<$H!"e(B1.8e$B$NHO0OFb$G>C$9$N$O$I$&$J$s$G$7$g$&!#e(B1.9e$B$G$Oe(B…e$B!"e(B
e$B;d$,<+$i0zF3$rEO$7$F$*$-$^$9!#e(B