Cover fe ature 47 january 2012 Published by the ieee computer Society 0018-9162/12/$31. 00 2012 ieee



Download 1,78 Mb.
Pdf ko'rish
bet25/32
Sana13.01.2022
Hajmi1,78 Mb.
#355100
1   ...   21   22   23   24   25   26   27   28   ...   32
Bog'liq
Software-for-infrastructure

partition(first,last,pred)

 places all the elements in 

the range 

[first,last)

 that satisfy 



pred

 before all the 

elements that don’t satisfy it. Note the absence of explicit 

tests and loops.

Expressing code in terms of algorithms rather than 

hand-crafted, special-purpose code can lead to more 

readable code that’s more likely to be correct, often more 

general, and often more efficient. Such code is also far 

more likely to be used again elsewhere. However, making 

algorithm-based code mainstream requires a culture 

change among systems programmers. Analyzing prob-

lems with the aim of coming up with general, elegant, 

and simple solutions isn’t emphasized in the education 

of or selection of systems programmers. Too many pro-

grammers take pride in complicated solutions (invariably 

assumed to be efficient), and too many managers are more 

impressed with such code than with simpler alternatives.

Complicated control flows also complicate resource 

management. A resource is anything that has to be ac-

quired and (explicitly or implicitly) released after use. 

Memory, locks, sockets, and thread handles are exam-

ples.


15

 For efficiency and local reasoning, it’s preferable to 

hold a resource for as short a time as possible and for that 

to be obvious. 

Consider a slightly artificial simple example. The func-

tion 



Download 1,78 Mb.

Do'stlaringiz bilan baham:
1   ...   21   22   23   24   25   26   27   28   ...   32




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish