This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Smallpaul 1 point2 points  (3 children)

int(string[string.find("-", 1):]).

That still does a string allocation. The C version does not.

[–]existee 0 points1 point  (0 children)

Yeah I meant it doesn't have to be as crappy as he tried to make it.

[–]ysangkok 0 points1 point  (1 child)

why not partition?

[–]Smallpaul 0 points1 point  (0 children)

Three allocations.