Skip to content

Instantly share code, notes, and snippets.

@masaha03
Created April 28, 2011 03:19
Show Gist options
  • Save masaha03/945735 to your computer and use it in GitHub Desktop.
Save masaha03/945735 to your computer and use it in GitHub Desktop.
空文字列判定
str <- ""
system.time(for (i in 1:30000000) str == "")
system.time(for (i in 1:30000000) nchar(str) == 0)
system.time(for (i in 1:30000000) nzchar(str))
str<-rep("", 30000000)
system.time(str=="")
system.time(nchar(str)==0)
system.time(nzchar(str))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment