Optimization

Optimization

isEmpty vs count == 0

isEmpty is more performant when using certain types of data.
Also it reads better when understanding logic.

Performance implications