# Search speed - an experiment

**URL:** https://community.thunkable.com/t/search-speed-an-experiment/1294157
**Category:** Questions about Thunkable X
**Created:** [May 19, 2021, 3:21pm UTC](https://community.thunkable.com/t/search-speed-an-experiment/1294157 "2021-05-19T15:21:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)
#### Post date: [May 19, 2021, 3:21pm UTC](https://community.thunkable.com/t/search-speed-an-experiment/1294157/1 "2021-05-19T15:21:24Z")

</div>

I see lots of requests to filter data, and was curious about which of two options was fastest. I did an experiment:

Setup: Data in a Google Spreadsheet. I have 668 rows of data. In the category column, I have equal numbers of A, B, C, and D categories. In the Authors column, each author is represented once or twice. Note that I get the column values from the Google Sheet just once, and it isn’t in my time calculation.

I start by grabbing a list of all values in the column to be searched.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/485ceeed0defcf16454a52a22f9d684803bbbb39.png)

Then I either iterate through each value, or I use list searching functions. You can see the two possibilities in the screenshots below:  
Option 1:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/b/6b9c3d18ec607916df4883f8b00c0987717a4a9d.png)

Option 2:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cf7e87612822fe2a0b930713e1359f8289e74101.png)

**So what’s faster?**  
If I am searching for two instances of a name in 668 rows, option 2 is faster. About 10-15ms, vs 250ms for option 1.  
If I am searching for 168 instances of a category in 668 rows, both options are 250ms+.

Take-home: If you are looking for a rare occurrence in your list, using a search like option 2 is going to save you a LOT of time.

Want to play with it yourself?  
[https://x.thunkable.com/copy/89a9f169b4aa3de978001f3a62d7a771](https://x.thunkable.com/copy/89a9f169b4aa3de978001f3a62d7a771)  
and then you’ll need to link it to some data, like this set: [Copy of QuotesSpreadsheet - Google Sheets](https://docs.google.com/spreadsheets/d/1Iu4u3NUH64HXuFJlTpe9cuL2I7hJ_q9xuMpZxuqeArw/edit?usp=sharing)

---

<div class="post-metadata">

### Author: ![doctorsof](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/doctorsof/32/30099_2.png) [@doctorsof](https://community.thunkable.com/u/doctorsof)
#### Post date: [June 26, 2021, 8:14pm UTC](https://community.thunkable.com/t/search-speed-an-experiment/1294157/2 "2021-06-26T20:14:09Z")

</div>

Thanks. If i am using Data viewer list which way is fast?

---

<div class="post-metadata">

### Author: ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)
#### Post date: [June 27, 2021, 10:42am UTC](https://community.thunkable.com/t/search-speed-an-experiment/1294157/3 "2021-06-27T10:42:19Z")

</div>

Data viewer list displays data. This post is about searching for a specific row in the data. Which situation of the two options above better describes your data?

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:22pm UTC](https://community.thunkable.com/t/search-speed-an-experiment/1294157/4 "2024-11-08T13:22:23Z")

</div>


