- C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
437 :デフォルトの名無しさん[sage]:2016/04/14(木) 19:49:22.63 ID:6mmaWOxx - オーバーフローしてるのかな
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
439 :デフォルトの名無しさん[sage]:2016/04/14(木) 20:44:06.05 ID:6mmaWOxx - double num = 0;
long i; for (i = 0; i < 4000000000; i++) { num += 0.000000001; } C# 16.0779196 sec VC++ 4.819276 sec
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
444 :デフォルトの名無しさん[sage]:2016/04/14(木) 21:52:21.38 ID:6mmaWOxx - >>443
これでええんやろ? http://i.imgur.com/CVrsovq.png
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
445 :デフォルトの名無しさん[sage]:2016/04/14(木) 21:53:43.91 ID:6mmaWOxx - 環境
http://i.imgur.com/DrtKHdg.png
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
446 :デフォルトの名無しさん[sage]:2016/04/14(木) 21:54:47.23 ID:6mmaWOxx - やっぱりC#おせえええええ
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
447 :デフォルトの名無しさん[sage]:2016/04/14(木) 21:56:51.54 ID:6mmaWOxx - #include "stdafx.h"
#include<stdio.h> #include<windows.h> void FileTimeToULargeInteger(ULARGE_INTEGER *ui, const FILETIME *ft1); int _tmain(int argc, _TCHAR* argv[]) { FILETIME ft1, ft2, ft3; ULARGE_INTEGER ui1, ui2, ui3; SYSTEMTIME st; /* 計算時間を計測:値渡し */ double num = 0; long i; GetSystemTimeAsFileTime(&ft1); for (i = 0; i < 4000000000; i++) { num += 0.000000001; } GetSystemTimeAsFileTime(&ft2); FileTimeToULargeInteger(&ui1, &ft1); FileTimeToULargeInteger(&ui2, &ft2); printf("%f\n%f", num,(ui2.QuadPart - ui1.QuadPart)/10000000.0); scanf("%c"); return 0; } /* FILETIME構造体変数をULARGET_INTEGER共用体へ格納する関数 */ void FileTimeToULargeInteger(ULARGE_INTEGER *ui, const FILETIME *ft1){ ui->HighPart = ft1->dwHighDateTime; ui->LowPart = ft1->dwLowDateTime; }
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
448 :デフォルトの名無しさん[sage]:2016/04/14(木) 21:57:10.07 ID:6mmaWOxx - using System;
using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { long i; double num = 0.0; long start = DateTime.Now.ToFileTime(); for (i = 0; i < 4000000000; i++) { num += 0.000000001; } long end = DateTime.Now.ToFileTime(); Console.WriteLine("{0:f}\n{1}", num, (end - start) / 10000000.0); Console.Read(); } } }
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
450 :デフォルトの名無しさん[sage]:2016/04/14(木) 22:20:31.85 ID:6mmaWOxx - >>449
変わらないが・・ C# 16.1259223 sec
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
452 :デフォルトの名無しさん[sage]:2016/04/14(木) 22:29:46.48 ID:6mmaWOxx - C#
http://i.imgur.com/CVrsovq.png VC++ http://i.imgur.com/FzdRqfV.png exeをダブルクリックして実行しても同じだった
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
453 :デフォルトの名無しさん[sage]:2016/04/14(木) 22:32:19.25 ID:6mmaWOxx - http://i.imgur.com/K3vWNiJ.png
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
459 :デフォルトの名無しさん[sage]:2016/04/14(木) 22:44:57.68 ID:6mmaWOxx - >>455
へえー
| - C#, C♯, C#相談室 Part90 [無断転載禁止]©2ch.net
461 :デフォルトの名無しさん[sage]:2016/04/14(木) 23:04:11.41 ID:6mmaWOxx - >>460
やったけど変わらなかった
|
|