2015-04-27から1日間の記事一覧
こういうどうでもいい関数があったとする。 hoge <- function(x) { result = x + 1; for(i in 1:10000000){ result <- result + 1; } result } この関数の実行速度+パフォーマンスを測るにはRprof関数を使って以下のように書く。 > Rprof(tmp <- tempfile())…
こういうどうでもいい関数があったとする。 hoge <- function(x) { result = x + 1; for(i in 1:10000000){ result <- result + 1; } result } この関数の実行速度+パフォーマンスを測るにはRprof関数を使って以下のように書く。 > Rprof(tmp <- tempfile())…