- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Binary search in assembly language
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2008 06:00 PM
тАО07-29-2008 06:00 PM
Binary search in assembly language
Can anyone please help me to convert it into assembly language?
If anyone can provide assembly language code for binary search (having different program logic),that will be also helpfull.
Thanks in advance..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2008 06:43 PM
тАО07-29-2008 06:43 PM
Re: Binary search in assembly language
is more than one assembly language, you know.
Why would a sane person (or you) wish to
convert a program like this into a
non-portable assembly language, rather than
into some high(er)-level language like C?
Homework? Challenge? Mental disorder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2008 10:53 PM
тАО07-29-2008 10:53 PM
Re: Binary search in assembly language
I want the code in HLASM assembly language.I want to put the assembler code in mainframe to replace the "SEARCH ALL" command in COBOL for binary search for performance improvement.
So Can anyone please provide me the HLASM assembler code for binary search?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2008 12:01 AM
тАО07-30-2008 12:01 AM
Re: Binary search in assembly language
you think that the built-in is so slow)?
Or C? Or anything other than assembly?
Modern compilers for modern CPUs can often
optimize high-level-language code to get a
better result than even a good assembly
programmer will typically get.
Why do you believe that the binary search is
your performance bottleneck?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2008 12:44 AM
тАО08-01-2008 12:44 AM
Re: Binary search in assembly language
Why would you think you can do better than what the compiler can do?
My COBOLII/iX compiler totally inlined SEARCH ALL, handling multiple keys with combination of ascending/descending.
The reason I did this, was the previous architecture had a runtime that was too complicated because it had to interpret how to compare the data types.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2008 04:44 PM
тАО08-01-2008 04:44 PM
Re: Binary search in assembly language
Other than that if you have any other idea,you can share with me.
Also I want to know about the inlined code of "SEARCH ALL".What kind of modifications have you done in code & compiler?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2008 06:47 PM
тАО08-01-2008 06:47 PM
Re: Binary search in assembly language
> will make execution faste.
What, you think that (1) the COBOL-generated
code is doing something stupid, and that (2)
you can generate better code than the
compiler's code generator?
(1): I doubt it.
(2): I doubt it.
http://www.thefreedictionary.com/dodo
See definition 3.
If (1) _is_ true, then you should be able to
do better using some other, easier-to-use
language than assembly. If that works, then
you can worry about what further improvement
you might get from converting your new code
to assembly (assuming that (2) is also true).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2008 11:09 PM
тАО08-01-2008 11:09 PM
Re: Binary search in assembly language
You may not get any benifits out of it(including performance).
The oppourtunity cost(http://en.wikipedia.org/wiki/Opportunity_cost) lost will be too high in doing this.
I suggest converting the program to C will be eaiser/simpler/better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2008 01:58 AM
тАО08-02-2008 01:58 AM
Re: Binary search in assembly language
Unless your COBOL compiler is pretty stupid, that probably won't help.
>Also I want to know about the inlined code of "SEARCH ALL". What kind of modifications have you done in code & compiler?
This won't help you because you would have to use the COBOLII/iX compiler on MPE/iX, which is out of support. ;-)
I was just mentioning it because I know how good the code can be. It's not rocket science.
Of course from the previous compiler, you can do a bad job too, where it is all done in the runtime library, with interpretation on every compare and worst of all, didn't know how to handle multiple sort keys. :-(