본문 바로가기
[android] ArrayMap 과 SparseArray 를 이용한 최적화 [android] ArrayMap 과 SparseArray 를 이용한 최적화 https://medium.freecodecamp.com/android-app-optimization-using-arraymap-and-sparsearray-f2b4e2e3dc47#.pg0eea2cx ArrayMap vs. HashMap -ArrayMap 은 android.util.ArrayMap 과 android.support.v4.util.ArrayMap 두 가지 형태가 있다.뒤의 녀석은 compat 이슈를 위한 것. -ArrayMap 은 HashMap 보다 더 memory 최적화된 데이터 구조를 가진다.ArrayMap 은 array 를 이용해 mapping 을 관리한다.Hash integer 를 가지고 있는 array 와,.. 2018. 3. 5.
[Kotlin Tutorial] Kotlin 의 Type system #2 [Kotlin Tutorial] Kotlin 의 Type system #2 참조 : Kotlin in action 6.2. Primitive and other basic types 6.2.1. Primitive types: Int, Boolean, and more -Kotlin 은 primitive type 과 wrapper type 을 구분하지 않는다. -그렇다면 Int 가 object 라면 Kotlin 은 모든 primitive type 을 실제로 object 로 만드는가?당연히 그렇게 안 했다.compiler 가 대부분의 Int type 을 Java 의 primitive type 으로 변형시킨다.generic, collection 등은 원래 Java 의 Integer 형태만 담을 수 있으므로 이 경.. 2017. 8. 22.
[JavaScript/Tutorial] typeof 사용시의 주의사항, array type 판별코드. typeof 사용시 주의사항, array type 판별코드 [이전강좌] Function 정의 방법 typeof 사용시 주의사항 typeof operator 를 사용하면, 그 값이 string type 으로 return 된다.이 중에서 조심해야 할 data type 은 array 와 null type 이다. typeof function // "function"typeof object // "object"typeof array // "object" - 주의!!typeof string // "string"typeof number // "number"typeof null // "object" - 주의!! array 판별 코드 typeof operator 만 이용해서는, 검사하는 변수가 object 인지, arr.. 2013. 5. 23.
반응형