Move digits_to into .cpp
authorBen Maurer <bmaurer@fb.com>
Mon, 12 Oct 2015 18:06:53 +0000 (11:06 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Tue, 13 Oct 2015 05:20:52 +0000 (22:20 -0700)
commitfa5d6ef366fe65fe2dea40e5f592982d10e4d728
treef701fdf4b5b7c7610ca59efef94fb3bdff7c1961
parent3a7ad48395acfe69ed4df89adce7ddd52aee26c4
Move digits_to into .cpp

Summary: objdump was showing that the shiftXXX tables are being generated each
time this file is included. For example, HHVM has about 200 of each
of the 4 tables. Since each one is 512 bytes this is 400 KB. I'm not
quite sure why this was happening -- I'd think that the linker would
combine a constant table that was identical.

I think the best thing to do here is just to use extern template. This
way you there's only one copy of the table and you don't have to parse
all of this code in every file

Reviewed By: @yfeldblum

Differential Revision: D2506571

fb-gh-sync-id: b01a522c536a2ff4136340245cacaa33897afefb
folly/Conv.cpp
folly/Conv.h