其中哪些会表现更好:
let personId = 1234
let realm = Realm()
let retrievedPerson = realm.object(Person.self).first {return $0.id == personId}
if let retrievedPerson = retrievedPerson {
retrievedPerson.lastUpdated = 2004
}
OR
let personId = 1234
let realm = Realm()
let realmPerson = RealmPerson(personId)
realm.write {
realm.add(person,update: true)
}