Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > pl.comp.programming > #30213 > unrolled thread
| Started by | Borneq <borneq@antyspam.hidden.pl> |
|---|---|
| First post | 2017-08-14 01:17 +0200 |
| Last post | 2017-08-16 22:16 +0200 |
| Articles | 7 on this page of 47 — 7 participants |
Back to article view | Back to pl.comp.programming
Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 01:17 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-13 16:35 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 02:40 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-14 01:03 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 10:14 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-14 01:31 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 15:10 +0200
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 15:17 +0200
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-14 15:26 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-14 06:36 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-16 22:17 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-16 14:31 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-17 09:01 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-18 08:01 +0200
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-18 00:20 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-18 07:50 +0200
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-18 01:42 -0700
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-18 01:53 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-18 11:37 +0200
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-18 03:07 -0700
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-18 03:10 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-18 12:38 +0200
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-18 06:02 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-19 21:51 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-19 14:02 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-19 14:17 -0700
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-19 17:46 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 00:46 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 01:14 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 01:26 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 01:42 -0700
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-20 03:30 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 04:01 -0700
Re: Automatic Reference Counting fir <profesor.fir@gmail.com> - 2017-08-20 04:16 -0700
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-20 04:51 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-20 10:41 +0200
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-20 10:35 +0200
Re: Automatic Reference Counting Tomasz Kaczanowski <kaczus@poczta.onet.pl> - 2017-08-21 07:49 +0200
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-21 03:23 -0700
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-20 04:55 -0700
Re: Automatic Reference Counting "M.M." <mmarszik@gmail.com> - 2017-08-18 03:40 -0700
Re: Automatic Reference Counting Wojciech Muła <wojtek.mula@gmail.com> - 2017-08-17 14:56 -0700
Re: Automatic Reference Counting Borneq <borneq@antyspam.hidden.pl> - 2017-08-18 07:09 +0200
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-18 07:58 +0200
Re: Automatic Reference Counting bartekltg <bartekltg@gmail.com> - 2017-08-18 01:50 -0700
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-18 07:54 +0200
Re: Automatic Reference Counting "AK" <nobody@nowhere.net> - 2017-08-16 22:16 +0200
Page 3 of 3 — ← Prev page 1 2 [3]
| From | "M.M." <mmarszik@gmail.com> |
|---|---|
| Date | 2017-08-18 03:40 -0700 |
| Message-ID | <7078a323-22f8-4aab-9d34-10585bed6887@googlegroups.com> |
| In reply to | #30358 |
On Friday, August 18, 2017 at 11:37:38 AM UTC+2, Borneq wrote: > W dniu 18.08.2017 o 10:42, bartekltg pisze: > > Powtarza się jeszcze jedną mądrość. Zaczynac od unique_ptr, a nuz > > wystarczy. > > Czy wystarczy? A jeśli wystarczy, to może i Java wystarczy, po co się męczyć z C++, wszak wiadomo, że pisanie programów, nie wspomniawszy o pisaniu zoptymalizowanych programów, w C++ jest i dużo trudniejsze i wymaga dużo więcej czasu. Nie wiem czy wystarczy. Gdy używam C++ i gdy użycie C++ jest uzasadnione, to zazwyczaj drobiazgi przeszkadzają (czyli nie-wystarczają). Kiedyś musiałem wywalić np. obiekt QDateTime, bo za wolno wykonywał, wydawałoby się, proste operacje na dacie i czasie. >[...] Pozdrawiam
[toc] | [prev] | [next] | [standalone]
| From | Wojciech Muła <wojtek.mula@gmail.com> |
|---|---|
| Date | 2017-08-17 14:56 -0700 |
| Message-ID | <6309d491-8662-4613-979d-4bb21dd1f5e2@googlegroups.com> |
| In reply to | #30304 |
On Wednesday, August 16, 2017 at 10:18:39 PM UTC+2, AK wrote: > Użytkownik "Borneq" <borneq@antyspam.hidden.pl> napisał: > > > Warto, kompilator się sam martwi o zwolnienie pamięci. Pytanie - jak to jest od środka robione. > > .. a co Cie to obchodzi? Bo standard wymusza określone cechy - np. std::shared_ptr jest bezpieczny wątkowo. A to znaczy, że może okazać się za wolny. :) w.
[toc] | [prev] | [next] | [standalone]
| From | Borneq <borneq@antyspam.hidden.pl> |
|---|---|
| Date | 2017-08-18 07:09 +0200 |
| Message-ID | <on5spj$uea$1@node1.news.atman.pl> |
| In reply to | #30346 |
W dniu 17.08.2017 o 23:56, Wojciech Muła pisze: > Bo standard wymusza określone cechy - np. std::shared_ptr jest > bezpieczny wątkowo. A to znaczy, że może okazać się za wolny. :) > > w. > używa: long volatile a = 5; _InterlockedIncrement(&a); _InterlockedDecrement(&a); a te dwie funkcje kompilowane są tylko do przedrostka lock przed inc/dec w kodzie assemblerowym.
[toc] | [prev] | [next] | [standalone]
| From | "AK" <nobody@nowhere.net> |
|---|---|
| Date | 2017-08-18 07:58 +0200 |
| Message-ID | <on5vn4$1gc$1@node1.news.atman.pl> |
| In reply to | #30347 |
Użytkownik "Borneq" <borneq@antyspam.hidden.pl> napisał:
>W dniu 17.08.2017 o 23:56, Wojciech Muła pisze:
>> Bo standard wymusza określone cechy - np. std::shared_ptr jest
>> bezpieczny wątkowo. A to znaczy, że może okazać się za wolny. :)
>>
>> w.
>>
> używa:
> long volatile a = 5;
> _InterlockedIncrement(&a);
> _InterlockedDecrement(&a);
>
> a te dwie funkcje kompilowane są tylko do przedrostka lock przed inc/dec w kodzie assemblerowym.
No widzisz :)!!!? A tak sie martwiles Krzyzowcze o wydajnosc:)
PS: No dooobra... Nie ma tak miodzio. Na Win to klasyczny mutex
(tak bylo w boost:shared_ptr. teraz (w standardzie, czy VC++2015) nie wiem
Rozstalem sie bez zalu na stare lata z ++żykami na dobre...
AK
[toc] | [prev] | [next] | [standalone]
| From | bartekltg <bartekltg@gmail.com> |
|---|---|
| Date | 2017-08-18 01:50 -0700 |
| Message-ID | <b5e90c5b-6aa4-4114-be30-867e7e1792ca@googlegroups.com> |
| In reply to | #30347 |
On Friday, August 18, 2017 at 7:09:09 AM UTC+2, Borneq wrote: > W dniu 17.08.2017 o 23:56, Wojciech Muła pisze: > > Bo standard wymusza określone cechy - np. std::shared_ptr jest > > bezpieczny wątkowo. A to znaczy, że może okazać się za wolny. :) > > > > w. > > > używa: > long volatile a = 5; > _InterlockedIncrement(&a); > _InterlockedDecrement(&a); > > a te dwie funkcje kompilowane są tylko do przedrostka lock przed inc/dec > w kodzie assemblerowym. http://en.cppreference.com/w/cpp/atomic/atomic ;-> pzdr bartekltg
[toc] | [prev] | [next] | [standalone]
| From | "AK" <nobody@nowhere.net> |
|---|---|
| Date | 2017-08-18 07:54 +0200 |
| Message-ID | <on5vgh$180$1@node1.news.atman.pl> |
| In reply to | #30346 |
Użytkownik "Wojciech Muła" <wojtek.mula@gmail.com> napisał: > Użytkownik "Borneq" <borneq@antyspam.hidden.pl> napisał: > > > Warto, kompilator się sam martwi o zwolnienie pamięci. Pytanie - jak to jest od środka robione. > > .. a co Cie to obchodzi? > Bo standard wymusza określone cechy - np. std::shared_ptr jest > bezpieczny wątkowo. A to znaczy, że może okazać się za wolny. :) Zgadza sie :), ale. 1. jego (shared_ptr-a) thread-safe jest naprawde tani, bo atomowy (zwykle rozkaz assemblera). 2. Martwic sie o to nalezy dopiero, gdy problem wydajnoisciowy sie pojawi a nie jeszcze "przez obudzeniem". AK
[toc] | [prev] | [next] | [standalone]
| From | "AK" <nobody@nowhere.net> |
|---|---|
| Date | 2017-08-16 22:16 +0200 |
| Message-ID | <on2991$edv$1@node1.news.atman.pl> |
| In reply to | #30216 |
Użytkownik "M.M." <mmarszik@gmail.com> napisał: > Ja mam inne pytanie, czy warto tego używać i dlaczego? ZDECYDOWANIE TAK ! (ba! warto nawet _wylacznie_ tego uzywac). PS: Pytanie tak z 20 lat spoznione. Juz wtedy bylo warto (vide: boost::smart_pointers). PS1: Jak zwykle w "standaryzacji" C++ czegos zapomniano/niedorobiono. Jest nim copy_pointer. AK
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | pl.comp.programming
csiph-web