Talk:Accelerometers
m |
|||
Line 2: | Line 2: | ||
1000 reads of values, parsing with scanf and writing to a file using repeated opening and closing of said file. | 1000 reads of values, parsing with scanf and writing to a file using repeated opening and closing of said file. | ||
+ | |||
real 0m 1.74s | real 0m 1.74s | ||
user 0m 0.09s | user 0m 0.09s | ||
Line 8: | Line 9: | ||
1000 reads, parsing and writing by using rewind. | 1000 reads, parsing and writing by using rewind. | ||
+ | |||
real 0m 1.19s | real 0m 1.19s | ||
user 0m 0.02s | user 0m 0.02s | ||
sys 0m 0.10s | sys 0m 0.10s | ||
- | This indicates that processor usage on applications with high fps and accelerometer usage could be lowered by using rewind instead of repeated fopen. Should this method of accessing the file be mentioned on the article? [[User:sharpneli|sharpneli]] 15:45, 18 January 2010 (UTC) | + | |
+ | This indicates that processor usage on applications with high fps and accelerometer usage could be lowered by using rewind instead of repeated fopen. Should this method of accessing the file be mentioned on the article? | ||
+ | |||
+ | [[User:sharpneli|sharpneli]] 15:45, 18 January 2010 (UTC) |
Latest revision as of 16:08, 18 January 2010
I performed simple timing measurements for using the repeated fopen compated to using rewind on the sysfs file (as sysfs files must be seeked to start or reopened to get new information) and they are as follows:
1000 reads of values, parsing with scanf and writing to a file using repeated opening and closing of said file.
real 0m 1.74s user 0m 0.09s sys 0m 0.57s
1000 reads, parsing and writing by using rewind.
real 0m 1.19s user 0m 0.02s sys 0m 0.10s
This indicates that processor usage on applications with high fps and accelerometer usage could be lowered by using rewind instead of repeated fopen. Should this method of accessing the file be mentioned on the article?
sharpneli 15:45, 18 January 2010 (UTC)
- This page was last modified on 18 January 2010, at 16:08.
- This page has been accessed 1,428 times.