"æ°ãã" ã¨ã¯ãä»ã¾ã§å ¨é¨ç¡åclassã«ã³ã³ãã¤ã«ãã¦ãã©ã ãããinvoke dynamic使ã£ã¦åçã«çæããããã«ãªãã¨ããããããã¤ã ã©ã ã以å¤ã®æé©åããã£ã¦ãããã§ããï¼è©³ããã¯ç¥ãã¾ããã Scala 2.12ããæ£å¼ã«å ¥ããããã§ããã(ããæ¸ãã¦ãæç¹ããè¦ã¦)ã¤ãæ¨æ¥ããã(2015/06/25)ã«åºãScala2.11.7ã§ããæ示çã«ãªãã·ã§ã³ãæå®ããã°ãå®é¨çãªãã·ã§ã³ã¨ãã¦ã§ããã使ããããã§ãã å é¨ã®ä»çµã¿ã¯ã以ä¸ã®Scaladays2015ã®ã¹ã©ã¤ãè¦ãã¨ãããã¨ã¯åèªã°ã°ã£ã¦ãã ãã http://downloads.typesafe.com/website/presentations/ScalaDaysSF2015/T2_Rytz_Backend_Optimizer.pdf å ¬å¼ã«æ¸ãã¦ããã¾ããã2.11.7ã«ããã¦Java8ã®ããã¯ã¨ã³ãã
[ã¾ã¨ã] LLè³ãscalaã®åå¼·ãå§ããã LLè³ãscalaã®åå¼·ãå§ããã ãã®34 Scalaã³ããæ¬ã®11ç« æ®ãããã£ã¦ãã¾ãã¾ããã¼ãä»åã¯ããªããã£ãåãªããã«ã¤ãã¦ãã¹ 11ç« ã¯å ¨ä½çã«åº§å¦çãªå 容ãªã®ã§ã»ã¼åçµâ¦(´ã»Ïã»ï½)â¦ã¾ãé å¼µãããããã ããªããã£ãåã®å®è£ æ¹æ³ Scalaã§ã®æ´æ°æ¼ç®ã¯JVMã¨ã®äºææ§ã®ç¹ããããªããã£ãåã®æ¼ç®ã¨ãã¦å®ç¾©ããã¦ãããããã¹ ãã ããæ´æ°ããªãã¸ã§ã¯ãã¨ãã¦æ±ãå¿ è¦ãã§ããå ´åã¯java.lang.Integerã¨ããããã¯ã¢ããã¯ã©ã¹ã使ãããããã¹ããã¡ãªã¿ã«æ´æ°ããªãã¸ã§ã¯ãã¨ãã¦æ±ãã®ã¯toStringã¡ã½ããã®å¼ã³åºããAnyåã®å¤æ°ã«æ´æ°ãä»£å ¥ãããããå ´åã¨ã®ãã¨ã§ãã ãã®ããã«Intåã®æ´æ°ã¯java.lang.Integerã«ééçã«å¤æããããããããã®å ´åã®java.lang.Integerãããã¯ã·
ã©ãã§ãããç´°ããããã©ã¼ãã³ã¹ã®è©±ãã¨ããã©ã¤ãã©ãªä½ã£ã¦éãã§ãå½±é¿ã§ãæè¿boxingãç´°ããããã©ã¼ãã³ã¹ã«ã¤ãã¦è²ã 調ã¹ã¦ãã®ã§ãã¤ãã§ã«æ¸ãã¦ããã 以åãããããã¡ãã£ã¨ã ãæ°ã«ãªã£ã¦ããã©ãã¡ããã¨è¨æ¸¬ãã¦ã¿ããä¸å¿å·®ãã§ãã ã¤ã¾ã val intList: List[Int] = // 大ããªIntã®List intList.map(identity) ããã val intList: List[Int] = // 大ããªIntã®List intList.map(x => x) ã®ã»ãããéããªã(å¯è½æ§ããã)ã¨ãã話ã§ãããã¡ãããæé©åã«ãã£ã¦å·®ãã§ãªããã¨ãããããå·®ãåºãã¨ãã¦ãããããæ°%ããæ°å%ç¨åº¦ã§ãããã scala -Xprint:jvm -e "List(0).map(identity)"ã scala -Xprint:jvm -e "List(
3. ⢠ãã®ã¹ã©ã¤ãã«åºã¦ããé度ãããã©ã¼ãã³ã¹ã¯ä¸¦åå®è¡ ãèæ ®ãã¦ãã¾ããã ⢠ãã®ã»ãã·ã§ã³ã¯Scalaãã®ãã¼ã対象ã¨ãã¦ãã¾ãã ⢠ãã³ããã¼ã¯ãåå¾ããç°å¢ã¯æ¬¡ãã¼ã¸ã«è¡¨ç¤ºãã¾ãã ⢠ããã©ã¼ãã³ã¹ã«ã¤ãã¦@Keenããããã¤ãã®ã¢ããã¤ã¹ã é ãã¾ããããããã¨ãï¼ acknowledgement ack. Parallel execution is not taken into account. 4. environment of benchmark ã¤ã³ã¹ã¿ã³ã¹ Amazon EC2 m3.2xlarge vCPU 8 memory 30GB ãã£ã¹ã¯ æ±ç¨SSD OS CentOS6.7-Final jdk jdk1.8.0u65(oracle, server vm) scala 2.11.7 ãã«ããã¼ã« sbt ãã³ããã¼ã¯ãã¼ã« sbt-jmh 0.2.
åæé èªä½ã¯ã¨ãã«æå³ããã¾ããããã¨ãã©ã®æé©åãã©ã®ãããéããªãã®ãï¼ãã詳細ã«è¨ã£ããã¨ã¯ãªãã§ããããåççã«ãããªã£ã¦ããã(ryãã¨ããã®ã説æããã«éãã¾ãããä¸ã«ã¯ãJITã§ç¡æå³ã«ãªããããªã©ãã§ãããç´°ãããããã¨ããæ¸ãã¦ããã¾ãããæé©åã®ãã¬ã¼ããªãã¨ãã¦å¤±ããã®ãããã®ã§ããã®ãããèªå·±è²¬ä»»ã§ãé¡ããã¾ããæ¬å½ã«æé©åãå¿ è¦ã¨ãããå ´åã¯ã以ä¸ã®ãã®ãç¡éã«å®è¡ããããã¾ãè¨æ¸¬ããã»ããããã®ã¯ãè¨ãã¾ã§ãããã¾ããã*1 1. private[this]ãã¤ãã scalaã®valãvarã¯ãprivate[this]ã«ããã¨ãã®ã¿ãç´æ¥ã®ãã£ã¼ã«ãã¢ã¯ã»ã¹ã«ãªãã¾ã(ãã以å¤ã§ã¯ã¡ã½ããå¼ã³åºã)ãã·ã³ã°ã«ãã³ã®objectã®å ´åãåæ§ã§ããprivate[this]ãã¤ããããå ´åã¯ã§ããã ãã¤ãã¾ããã 2. ãªãã§ãããã§ãListãã¤ãã㪠æåã®
åæ(æ稿æ¥ï¼2011/11/30)ã¸ã®ãªã³ã¯ Yammerã®å¾æ¥å¡ã§ããCoda Haleæ°ãScalaã®åç¨ãã³ãã§ããTypesafe社ã¸éã£ãã¡ã¼ã«ãYCombinatorã¨GitHubã®gistçµç±ã§ãªã¼ã¯ãããã¡ã¼ã«ã«ããã°ãYammerã¯è¤éããæ§è½é¢ãéã¿ã¦ãåºç¤ã®ã¤ã³ãã©ãScalaããJavaã¸æ»ãããã ã Yammerã®PRé¨éã®Shelley Riskæ°ã«ããã°ãã®ã¡ã¼ã«ã¯Coda Haleæ°ã®å人çãªæè¦ã§ãããYammerã®å ¬å¼ãªè¦è§£ã§ã¯ãªãã¨ã®ãã¨ã ããã®ãªã¼ã¯å¾ãCoda Haleæ°ã¯èªèº«ã®èããhttp://codahale.com/the-rest-of-the-story/ã§è¡¨æãã¦ãããæ°ã¯ãã®ã¡ã¼ã«ã¯Donald Fischeræ°(Typesafe社ã®CEO)ããã®ãã£ã¼ãããã¯ã®è¦è«ã«çãããã®ã§ã移è¡ã示åãããã¤ã¼ããè£è¶³ãããã®ã ã¨èª¬æãã¦
ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ãã®ã¤ã³ã¿ã¼ãããåºåäºæ¥ãæè¡é¢ããæ¯ãããã¢ããã¯ã¹ã¿ã¸ãªãã§ã¯ãé¢æ°åè¨èªã®ä¸ã¤ã§ããScalaãç©æ¥µçã«æ´»ç¨ããã¦ãã¾ããä»åãã¹ãã¼ããã©ã³ç¹ååã®ãªã¢ã«ã¿ã¤ã ã¿ã¼ã²ãã£ã³ã°åºåãå®ç¾ãããµã¼ãã¹ãDynalystãï¼â å³1ï¼ãéçºããéç¿å æ°ï¼åç1â ï¼â ãããã¦ã¹ãã¼ããã©ã³åãã¢ããã©ãããã©ã¼ã ã§ãããAMoAdã¢ããããã¯ã¼ã¯ãï¼â å³2ï¼ã®éçºã¨éç¨ãæ å½ããäºä¸ããæ°ï¼åç2ï¼ã«ãScalaã®é åã伺ãã¾ããã ææ°ã®ã¢ããã¯ãè©°ãè¾¼ãã Dynalystã«Scalaãæ¡ç¨ ââæåã«Scalaã«èå³ãæã£ããã£ãããæãã¦ãã ããã äºä¸ï¼ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ãã«å ¥ç¤¾ããåããé¢æ°åè¨èªã«èå³ããããè©ä¾¡ãå¿ è¦ã«ãªãã¾ã§å®éã®è¨ç®ãè¡ããªãé 延è©ä¾¡ã®ããã¿ãªã©ã«é åãæãã¦ãã¾ããããã®ä¸ã§ãç¹ã«Scalaã«ã¯JVMä¸ã§å®è¡ã§ããã¨ãã£ãã¡ãªããããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}