---
title: "Making Variable Access Faster with Typing"
url: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/making-variable-access-faster-with-typing.md"
canonical: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/making-variable-access-faster-with-typing/"
tags: []
author: "Roy Osherove"
description: "Lesson 9 of 18 in Automating All the Things with FinalBuilder (Iterations and Variables), 1:01. Free video by Roy Osherove."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Making Variable Access Faster with Typing

1. [Courses](https://courses.osherove.com/#courses)
2. [Automating All the Things with FinalBuilder](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/)
3. Iterations and Variables

Lesson 9 of 18

Duration: 1:01 [Watch on YouTube](https://www.youtube.com/watch?v=AkeoZ5norN4)

## In this lesson

Roy Osherove shows that the types of variables matter for speed: when the content is put into string variables instead of variants, [FinalBuilder](https://osherove.com/blog/2005/3/12/cooltool-finalbuilder-30-the-ultimate-build-management-and-a.html "[CoolTool] FinalBuilder 3.0 - the ultimate build management and automation tool (osherove.com)") does not have to figure out what the content is, and access to the variables is usually much faster.

## Transcript

145 words

[\[00:02\]](https://www.youtube.com/watch?v=AkeoZ5norN4&t=2s) Here's another important trick that I want to show you. I want to show how we can actually make things go faster. Right now, let's look at how long it takes to iterate. And you'll see that some of the strings seems to sometimes be iterating quite slowly. The types of the variables are very important. If the types match the content, the content will go much faster. Let me just try to to show that again. You'll see that sometimes iteration takes sometimes more, sometimes less.

[\[00:33\]](https://www.youtube.com/watch?v=AkeoZ5norN4&t=33s) Let's try that again. Seems to be okay. If we put the contents into actual strings instead of variants, then FinalBuilder doesn't have to figure out what is the content, see what it fits into, etc. So, if it's a string, declare it as a string. And what you'll see is usually much faster access to the variables.

## Related

### Also linked in this lesson

#### osherove.com

- [\[CoolTool\] FinalBuilder 3.0 - the ultimate build management and automation tool](https://osherove.com/blog/2005/3/12/cooltool-finalbuilder-30-the-ultimate-build-management-and-a.html)

[Previous lesson Downloading a Web Page & Using Literal Variables](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/downloading-a-web-page-and-using-literal-variables/) [Next lesson Reusable Action Lists and Action Groups](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/reusable-action-lists-and-action-groups/)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
