Created
January 30, 2014 00:04
-
-
Save yadudoc/8699928 to your computer and use it in GitHub Desktop.
Swift-Memory Analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number of files, File size, no_strings.swift-Used_Heap, no_strings.swift-Crt_Heap, strings.swift-Used_Heap, strings.swift-Crt_Heap | |
1, 1, 93Mb, 362M, 95Mb, 362Mb | |
10, 1, 95Mb, 362M, 175Mb, 457Mb | |
100, 1, 95Mb, 362M, ---Mb, 362Mb | |
Experiment 2: Lazy ranges. | |
Assumptions: An int in swift, is 8 Bytes (64 bit). Array is a hashtable with unknown memory pattern. | |
10^6 integers should take ~8Mb. | |
Use java.lang.Math.abs(int) | |
Swift 0.94, with 256Mb heap fails with java.lang.OutOfMemoryError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment