Re: anybody knows an apache-license-compatible impl of Integer.parseInt?
Zheng Shao wrote: We need to implement a version of Integer.parseInt/atoi from byte[] instead of String to avoid the high cost of creating a String object. I wanted to take the open jdk code but the license is GPL: http://www.docjar.com/html/api/java/lang/Integer.java.html Does anybody know an implementation that I can use for hive (apache license)? I also need to do it for Byte, Short, Long, and Double. Just don't want to go over all the corner cases. Use the Apache Harmony code http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/
anybody knows an apache-license-compatible impl of Integer.parseInt?
We need to implement a version of Integer.parseInt/atoi from byte[] instead of String to avoid the high cost of creating a String object. I wanted to take the open jdk code but the license is GPL: http://www.docjar.com/html/api/java/lang/Integer.java.html Does anybody know an implementation that I can use for hive (apache license)? I also need to do it for Byte, Short, Long, and Double. Just don't want to go over all the corner cases. Solutions from c/c++ are OK (as long as the license does not conflict). I can translate it. Zheng
Re: anybody knows an apache-license-compatible impl of Integer.parseInt?
Hey zheng, Maybe you can try ragel ,which can compile very effective codes for your fsm from regex. The atoi function produced by ragel can run faster than glibc's. It also targets java. http://www.complang.org/ragel/ On Wed, Feb 11, 2009 at 4:18 AM, Zheng Shao zs...@facebook.com wrote: We need to implement a version of Integer.parseInt/atoi from byte[] instead of String to avoid the high cost of creating a String object. I wanted to take the open jdk code but the license is GPL: http://www.docjar.com/html/api/java/lang/Integer.java.html Does anybody know an implementation that I can use for hive (apache license)? I also need to do it for Byte, Short, Long, and Double. Just don't want to go over all the corner cases. Solutions from c/c++ are OK (as long as the license does not conflict). I can translate it. Zheng Cheers, Min Zhou -- My research interests are distributed systems, parallel computing and bytecode based virtual machine. http://coderplay.javaeye.com