Skip to content

Instantly share code, notes, and snippets.

@bsneed
bsneed / Timings.txt
Last active January 9, 2016 17:29
Performance Comparison of Swift JSON->Model frameworks.
Time to decode 10,000 Person struct's from JSON:
Argo (Simple): 8.563 seconds
measureBlock {
let _ : [Person]? = decode(data)
}
Argo (Decomp'd): 3.344
measureBlock {
let json: Argo.JSON = JSON.parse(data)
@kostiakoval
kostiakoval / String+RangeOf.swift
Last active February 13, 2016 16:45
Pure Swift rangeOf String
// MARK: - String
extension String {
func rangeOf(x: String) -> Range<Index>? {
return characters.rangeOf(x.characters)
}
}
extension String.CharacterView {