15,851,395 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: Convert curl request k50544-Jul-22 7:17 k5054 4-Jul-22 7:17
 Re: Convert curl request _Flaviu4-Jul-22 8:10 _Flaviu 4-Jul-22 8:10
 Re: Convert curl request k50544-Jul-22 8:17 k5054 4-Jul-22 8:17
 Re: Convert curl request _Flaviu4-Jul-22 8:31 _Flaviu 4-Jul-22 8:31
 Re: Convert curl request Richard MacCutchan4-Jul-22 10:21 Richard MacCutchan 4-Jul-22 10:21
 Re: Convert curl request _Flaviu4-Jul-22 20:48 _Flaviu 4-Jul-22 20:48
 Re: Convert curl request k50544-Jul-22 10:26 k5054 4-Jul-22 10:26
 Amazing C/C++ and C# and Python performance test Code4Ever2-Jul-22 7:48 Code4Ever 2-Jul-22 7:48
 I tried to do a basic calculation for testing the performance of different programming languages: C/C++: (***3.05 s***) ```int main() { int start = clock(); double result; //<...> for (size_t i = 1; i < 100000000; i++) { result = sin((i * 25) / i * i); } //<...> int end = clock();//Now check what amount of ticks we have now. //To get the time, just subtract start from end, and divide by CLOCKS_PER_SEC. std::cout << "it took " << end - start << "ticks std::endl; }``` C#: (***2.452 s***) ```using System.Diagnostics; class TestClass { static void Main(string[] args) { Stopwatch sw = new Stopwatch(); double result; sw.Start(); { for (int i = 1; i < 100000000; i++) { result = Math.Sin((i * 25)/i * i); } } sw.Stop(); Console.WriteLine(sw.ElapsedMilliseconds.ToString()); } }``` And the same calculation in Python took 22.14 s to complete Why is C# faster than C++?
 Re: Amazing C/C++ and C# and Python performance test Gerry Schmitz2-Jul-22 8:02 Gerry Schmitz 2-Jul-22 8:02
 Re: Amazing C/C++ and C# and Python performance test harold aptroot2-Jul-22 8:38 harold aptroot 2-Jul-22 8:38
 Re: Amazing C/C++ and C# and Python performance test CPallini2-Jul-22 12:07 CPallini 2-Jul-22 12:07
 image background datagrid ousaokn30-Jun-22 20:26 ousaokn 30-Jun-22 20:26
 Re: image background datagrid Victor Nijegorodov30-Jun-22 21:11 Victor Nijegorodov 30-Jun-22 21:11
 Re: image background datagrid Gerry Schmitz1-Jul-22 5:21 Gerry Schmitz 1-Jul-22 5:21
 File IO library Calin Negru26-Jun-22 4:45 Calin Negru 26-Jun-22 4:45
 Re: File IO library Greg Utas26-Jun-22 5:21 Greg Utas 26-Jun-22 5:21
 Re: File IO library Calin Negru26-Jun-22 12:17 Calin Negru 26-Jun-22 12:17
 Re: File IO library k505426-Jun-22 5:21 k5054 26-Jun-22 5:21
 Re: File IO library Richard MacCutchan26-Jun-22 5:49 Richard MacCutchan 26-Jun-22 5:49
 hello guy my name is SARORN can i ask you about any inform? Sa Ron 202224-Jun-22 6:40 Sa Ron 2022 24-Jun-22 6:40
 Re: hello guy my name is SARORN can i ask you about any inform? Victor Nijegorodov24-Jun-22 6:51 Victor Nijegorodov 24-Jun-22 6:51
 Re: hello guy my name is SARORN can i ask you about any inform? k505424-Jun-22 7:27 k5054 24-Jun-22 7:27
 Re: hello guy my name is SARORN can i ask you about any inform? RedDk24-Jun-22 9:42 RedDk 24-Jun-22 9:42
 c++ tuanguyen200021-Jun-22 23:59 tuanguyen2000 21-Jun-22 23:59
 Re: c++ CPallini22-Jun-22 1:02 CPallini 22-Jun-22 1:02
 Last Visit: 31-Dec-99 19:00     Last Update: 4-Mar-24 15:03 Refresh ᐊ Prev1...62636465666768697071 Next ᐅ