-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmarking TextFinder performance compared to other loop/filter techniques #1
Comments
TextFinder
performance compared to other loop/filter techniques
Thank you for your comment. In this case, I would like to measure the cost with enabling V8 runtime. When I got the result, I would like to report it. |
I have a question for correctly understanding about your proposal. When it measures the process cost of TextFinder, the values on the Spreadsheet are used. So in order to correctly understand about this process, I think that when it measures the find values from an array, it is required to include both costs of the retrieve values from Spreadsheet and the search of values. So in this case, I think that the following scripts are required to be compared. In this sample script, the row number is retrieved. How about this? For TextFinderconst result = SpreadsheetApp
.getActiveSpreadsheet()
.getSheetByName(name)
.createTextFinder(findText)
.findAll()
.map(range => range.getRow()); For find values from an arrayconst result = SpreadsheetApp
.getActiveSpreadsheet()
.getSheetByName(name)
.getDataRange()
.getValues()
.reduce((ar, row, i) => {
if (row.indexOf(findText) > -1) ar.push(i + 1);
return ar;
}, []); By the way, when the searched rows are retrieved, it has already been found that the process cost of TextFinder is higher than that of the find values from an array, because |
I agree that the cost of getting sheet values should be factored in. I wonder if it is also worth exploring the the impact of |
Thank you for replying. About the cost of
When you have any questions and proposals, please tell me. I would like to start the measurement when we could confirm that our directions became the same. |
This makes sense - other people will be able to extend the experiment to cover other use cases if needed |
Thank you for replying. I would like to start to measure the process cost. When I could obtain the result, I would like to publish it and tell here. |
I published "Benchmark: Process Costs for Searching Values in Spreadsheet using Google Apps Script" as a report. Could you please confirm it? |
Excellent work and interesting results. I wonder if as well as the code snippets you could share the entire code and example Google Sheet so that other people can replicate the experiment? |
Thank you for replying. I added the sample script for measuring the process cost. |
Thanks for putting this together. I've posted on Pulse and plan to reference this work in another post 👍 |
Thank you for replying and posting it. To search a value from Spreadsheet is included in a lot of situations for applications. And I think that when a value is searched from a Spreadsheet using Google Apps Script, TextFinder is easier to use than the query language. So I believe that the post will be useful for a lot of users. Thank you for proposing it. |
Big fan of your work and various benchmark reports. I know you've already highlighted the
TextFinder
class in Spreadsheet services as one of your examples. I wonder if you have considered writing a report onTextFinder
performance compared to other javascript techniques for finding values in arrays?The text was updated successfully, but these errors were encountered: