473,569 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prefered language for datastructures

hello every one ,
i know this is a c++ forum ,but as i cudn't get any datastructures
forum ..iam
posting here :
can anyone tell me which is the best language to be used for
implementation of datastructures
by best i mean speed of operation :
and if given a choise that someone knows both c and c++ which one will
be convinent ang faster for implementimg data structures??

thank you
mohan gupta
Jun 27 '08 #1
2 1226
On 25 Apr, 10:21, mohi <mohangupt...@g mail.comwrote:
i know this is a c++ forum ,but as i cudn't get any datastructures
forum ..iam posting here :
you could try comp.lang.progr amming for
this sort of general discussion.

can anyone tell me which is the best language to be used for
implementation of datastructures
by best i mean speed of operation :
an odd definition of "best". C++ was designed with a principal
aim of producing high quality libraries. Take a look at templates
and the STL. If your data structures are fairly ordinary like
linked lists then C++ may already have standard implementations .

and if given a choise that someone knows both c and c++ which one will
be convinent *ang faster for implementimg data structures??
since C++ is almost a super-set of C anything that can be
done in C can be done in C++. So speed-wise C++ should always
be able to closely match C.

The one exception is C's new "restict" keyword. In theory
compilers could produce faster code when restrict is used.
I've no idea if any actually do.

C++ has templates. Hence generic data structures can be written.
C has no equivalent facility. C++ has inline (the latest not
widely implemented C standard also has inline) which can
make things faster.

C++ can support something called template meta programming
in which some truely amzing things can be done. This
includes high performance libraries.

Why do you want fast data structures?
--
Nick Keighley

Both the tractability and the invisibility of the software product
expose its builders to perpetual changes in requirements...
-- Brookes
Jun 27 '08 #2
On 2008-04-25 11:21, mohi wrote:
hello every one ,
i know this is a c++ forum ,but as i cudn't get any datastructures
forum ..iam
posting here :
can anyone tell me which is the best language to be used for
implementation of datastructures
by best i mean speed of operation :
and if given a choise that someone knows both c and c++ which one will
be convinent ang faster for implementimg data structures??
If find your question quite strange, the best language will probably be
the same language as you will be using the data structures with. Unless
you want to write the structures just for the fun of it, in which case
you should use the language you like the most or want to learn.

--
Erik Wikström
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1214
by: Bram Stolk | last post by:
Hello, Python features the Queue.Queue object that provides thread-safe access. What if I want thread access to other types of datastructures? Would I need to pair e.g. each list, Set or hashmap with its own threading.Semaphore() object? Or is there an easier way to have thread-safe access to datastructures?
10
1666
by: cj | last post by:
Hello, can you please help me find information or can you please explain in this newsgroup the differences about various datastructures (in terms of efficiency, best applications, best implementations, etc.), such as trees, hashtables, linked lists, etc. Thank you. C++J
1
2696
by: Bore Biko | last post by:
In this time a new mostly languges (Java, C#), uses garbage collection, ant this was a one of faults of LISP in past times... The idea of Java virtual machine is totaly copy of LISP byte code commpilling.. Also LISP is as all "new" languges also ovbject.. And with all of this things that LISP have from 1958.. The new programming...
9
2200
by: gold | last post by:
Hello all, I want know abt wht kind of datastructures using both C & C++ internally. Some were said heap, others said tree anyone can explain brief?
0
1384
by: Marshal | last post by:
I've just had a chance to review LINQ, DLinq, and XLinq, (which I only heard about last week after the PDC). The various LINQs actually seem to live up to expectations - Using query semantics to retrieve a subset of data from arbitrary data-architectures (though I hope the sub-LINQ distinctions can be held coherent over time by the same...
10
1657
by: Bore Biko | last post by:
In this time a new mostly languges (Java, C#), uses garbage collection, ant this was a one of faults of LISP in past times... The idea of Java virtual machine is totaly copy of LISP byte code commpilling.. Also LISP is as all "new" languges also ovbject.. And with all of this things that LISP have from 1958.. The new programming...
1
1242
by: jens Jensen | last post by:
Hello, I have two version of a site. I need to redirect users based on the language i think the speak/understand. Any idea how to best do this? Many thanks in advanc JJ
44
3536
by: Jon Harrop | last post by:
Microsoft Research are developing a functional programming language called F# for .NET and I've been playing with it recently. I've uploaded some demos here: http://www.ffconsultancy.com/dotnet/fsharp/ I'm keen to see what Windows developers think of this language as we're considering using it to develop commercial applications on the...
2
1743
by: sathishc58 | last post by:
Hi All I recently studied about "Forest" Datastructures. Supposed we have two trees. Could not represent diagramatically Tree a ====== 1) 10 is the root node 2) 9 is the
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.