Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
4615f651
Commit
4615f651
authored
Mar 23, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X reduce allocations more
parent
3a528165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
t/neo/storage/fs1/cmd/fstail/xstrconv.go
t/neo/storage/fs1/cmd/fstail/xstrconv.go
+1
-1
No files found.
t/neo/storage/fs1/cmd/fstail/xstrconv.go
View file @
4615f651
...
...
@@ -20,7 +20,7 @@ func pyQuote(s string) string {
const
hex
=
"0123456789abcdef"
func
pyQuoteBytes
(
b
[]
byte
)
[]
byte
{
buf
:=
make
([]
byte
,
0
,
len
(
b
)
+
2
/*quotes*/
)
// XXX revisit and do *1.5 ? or *2
buf
:=
make
([]
byte
,
0
,
(
len
(
b
)
+
2
)
/* to reduce allocations when quoting */
*
2
)
// smartquotes: choose ' or " as quoting character
// https://github.com/python/cpython/blob/v2.7.13-116-g1aa1803b3d/Objects/stringobject.c#L947
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment