Is this expected? All the results/table are collected in a single instance
of vim; tried it with "-u NONE". I've run asan and valgrind on
test_filter_map and don't see any leaks. If these results are a surprise, I
can look further. I haven't run the linux/gnu profiler yet. I saw vim's
MEM_PROFILE, I'll check that out. Other suggestions for investigation?
Not just map, but that's part of what I'm looking at now.
Looking to understand some profiling results.
In the following nInput is number of items in "input: list<number>"
The code is run 5 times with the specified parameters nInputXnLoop.
Each cell is the fastest result of the 5 runs.
The first set of results are execute left to right, the second set are run
right to left. I had incorrectly thought that more work and higher number
of loops caused the slower results; but it seems that the greatest
contributor to slowdown is how much vim's been running. The most dramatic
difference can be seen
in 3x99 (list of 3 numbers, 99 loops) for map(in, Map1)
119 usec/op vs 5 usec/op.
Note that map(in, 'v:val') has a similar effect but not nearly so dramatic;
it's closer to proportionate for the workload (number of list items).
After the results, is the code that's being profiled
-ernie
=== summary results
1x33 1x65 1x99 2x33 2x65 2x99 3x33 3x65 3x99 :
nInputXnLoop (cells: usec/op)
0.652 0.671 0.725 0.916 0.953 0.951 1.188 1.271 1.200 :
map(in, 'v:val') ###-2
2.918 16.121 31.023 13.029 41.957 70.292 35.317 76.674 119 :
map(in, Map1) ###-6
REVERSE column order of execution
1x33 1x65 1x99 2x33 2x65 2x99 3x33 3x65 3x99 :
nInputXnLoop (cells: usec/op)
0.859 0.768 0.656 1.091 1.007 0.887 1.299 1.281 1.061 :
map(in, 'v:val') ###-2
40.001 28.434 12.215 69.711 41.915 13.326 89.459 52.533 4.873 :
map(in, Map1) ###-6
=== full results
$ ./vimprof_summarize | ./vimprof_create_table
1x33 1x65 1x99 2x33 2x65 2x99 3x33 3x65 3x99 :
nInputXnLoop (cells: usec/op)
0.074 0.070 0.071 0.073 0.074 0.069 0.074 0.078 0.069 :
result = [] ###-0
0.155 0.161 0.173 0.190 0.202 0.192 0.209 0.222 0.206 : in =
input->copy() ###-1
0.652 0.671 0.725 0.916 0.953 0.951 1.188 1.271 1.200 :
map(in, 'v:val') ###-2
0.077 0.077 0.080 0.080 0.083 0.084 0.082 0.087 0.083 :
result = [] ###-4
0.156 0.157 0.156 0.186 0.190 0.187 0.209 0.215 0.211 : in =
input->copy() ###-5
2.918 16.121 31.023 13.029 41.957 70.292 35.317 76.674 119 :
map(in, Map1) ###-6
0.082 0.090 0.098 0.087 0.098 0.097 0.092 0.102 0.098 :
result = [] ###-8
REVERSE
$ ./vimprof_summarize | ./vimprof_create_table
1x33 1x65 1x99 2x33 2x65 2x99 3x33 3x65 3x99 :
nInputXnLoop (cells: usec/op)
0.092 0.076 0.070 0.092 0.076 0.070 0.082 0.081 0.066 :
result = [] ###-0
0.177 0.163 0.157 0.193 0.182 0.177 0.211 0.208 0.180 : in =
input->copy() ###-1
0.859 0.768 0.656 1.091 1.007 0.887 1.299 1.281 1.061 :
map(in, 'v:val') ###-2
0.082 0.079 0.078 0.084 0.081 0.080 0.080 0.083 0.077 :
result = [] ###-4
0.164 0.173 0.160 0.192 0.194 0.188 0.215 0.216 0.195 : in =
input->copy() ###-5
40.001 28.434 12.215 69.711 41.915 13.326 89.459 52.533 4.873 :
map(in, Map1) ###-6
0.111 0.102 0.091 0.117 0.107 0.093 0.111 0.113 0.079 :
result = [] ###-8
=== code being profiled
def Map1(_, val: number): number
return val
enddef
def Map(xxx: list<any>)
result = [] ###-0
var in: list<number>
in = input->copy() ###-1
map(in, 'v:val') ###-2
if expect != in | Oops() | endif
result = [] ###-4
in = input->copy() ###-5
map(in, Map1) ###-6
if expect != in | Oops() | endif
result = [] ###-8
enddef
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/fab62a69-358d-d855-ab38-0fb565f17ddf%40raelity.com.