MCPcopy Create free account
hub / github.com/brimdata/super / fastPathLoop

Method fastPathLoop

runtime/vam/expr/function/time.go:147–162  ·  view source on GitHub ↗
(f *strftime.Strftime, vec *vector.Int, index []uint32)

Source from the content-addressed store, hash-verified

145}
146
147func (s *Strftime) fastPathLoop(f *strftime.Strftime, vec *vector.Int, index []uint32) *vector.String {
148 if index != nil {
149 out := vector.NewStringEmpty(uint32(len(index)))
150 for _, i := range index {
151 s := f.FormatString(nano.Ts(vec.Values[i]).Time())
152 out.Append(s)
153 }
154 return out
155 }
156 out := vector.NewStringEmpty(vec.Len())
157 for i := range vec.Len() {
158 s := f.FormatString(nano.Ts(vec.Values[i]).Time())
159 out.Append(s)
160 }
161 return out
162}
163
164func (s *Strftime) slowPath(fvec vector.Any, tvec vector.Any) vector.Any {
165 var f *strftime.Strftime

Callers 1

fastPathMethod · 0.95

Calls 5

NewStringEmptyFunction · 0.92
TsTypeAlias · 0.92
LenMethod · 0.65
TimeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected