www.digitalmars.com         C & C++   DMDScript  
Archives

D Programming
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger
D.gnu
D

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics


digitalmars.D.bugs - [Issue 3758] New: Create D impementation of to!(float, string), etc.

http://d.puremagic.com/issues/show_bug.cgi?id=3758

           Summary: Create D impementation of to!(float, string), etc.
           Product: D
           Version: 2.040
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: performance
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com


--- Comment #0 from David Simcha <dsimcha yahoo.com> 2010-01-31 08:14:15 PST ---
std.conv calls the c functions atof, atod, atold, etc. for to!(float, string),
to!(double, string), and to!(real, string) respectively.  There are two
practical reasons why we need D implementations of these functions:

1.  Strings should be convertible to floats at compile time.
2.  To make the input string compatible with C, it is copied using toStringz. 
This is inefficient, especially when trying to real large files with ASCII
numbers in and convert the ASCII numbers to floats.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 31 2010