Skip to content

ReenExeCubeTime/CompareShortCondition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CompareShortCondition

Build Status

What fast?
if (some) {
  return 'a'
} else if (other) {
  return 'b'
} else {
  return 'c'
}

or same

if (some) {
  return 'a'
}

if (other) {
  return 'b'
}

return 'c'

Travis build output:

    Simple get 0.289999992
    Condition getIf 0.409999996
    Condition getIfElse 0.410000026

My terminal output:

    Simple get 0.233629003
    Condition getIf 0.292778015
    Condition getIfElse 0.320569992

Conclusions:

Compiler optimize it - so time almost same - see Travis build

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages