Skip to content

Instantly share code, notes, and snippets.

View kasrababaei's full-sized avatar

Kasra Babaei kasrababaei

View GitHub Profile
Command Mean [s] Min [s] Max [s]
!isEmpty 3.304 ± 0.049 3.221 3.422
isEmpty == false 4.082 ± 0.511 3.235 4.551
isEmpty.isFalse 3.294 s ± 0.050 3.192 3.420

The data is collected by using hyperfine to run each case 100 times:

hyperfine --prepare 'rm -rf ./.build' --runs 100 'swift build'
@kasrababaei
kasrababaei / AoC2024Day7.swift
Last active December 8, 2024 19:20
Advent of Code 2024 Day 7
import Foundation
import RegexBuilder
struct Y2024Day07: AdventDay {
enum Operation {
case add
case multiply
}
let data: String
{
"profile": "https://www.kasrababaei.com/images/Kasra-.jpg",
"fullname":"Kasra Babaei",
"education": [
["BSc", "Business Administration"],
["MSc", "Information Technology"]
],
"skills": [
"Proficient in Swift.",
"Experienced with Objective-C, Java and Python.",