I have like below code,
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
    val view = holder.view
    view.apply {
        name.text = list[position].name
        age.text = list[position].age
        address1.text = list[position].address1
        address2.text = list[position].address2
        zip_code.text = list[position].zip_code
    }
}
it's seeking the data multiple times to get each property, like name, age, address1..
And I'm wondered is it better assign the data to a variable and use it? like this,
val view = holder.view
val data = list[position]
view.apply {
    name.text = data.name
    age.text = data.age
    address1.text = data.address1
    address2.text = data.address2
    zip_code.text = data.zip_code
}
Assigning to new variable is cost more?
Please advise me which is better and why?
 
     
    