On Tue, Apr 27, 2021, 8:55 AM Manlio Perillo <manlio.peri...@gmail.com>
wrote:

> Il giorno martedì 27 aprile 2021 alle 17:51:46 UTC+2 Ian Lance Taylor ha
> scritto:
>
>> On Tue, Apr 27, 2021 at 7:43 AM Manlio Perillo <manlio....@gmail.com>
>> wrote:
>> >
>> > Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha
>> scritto:
>> >>
>> >> So I really want to know what is the right way to do vdso call outside
>> runtime?
>> >>
>> > What about using a different function instead of time.Now, and using
>> RawSyscall?
>>
>> That wouldn't be a VDSO call. VDSO calls are in general faster than
>> system calls. There is more background at
>> https://man7.org/linux/man-pages/man7/vdso.7.html.
>
> Ian
>
>
> Yes, that wouldn't a VDSO call.  But since a VDSO call will require cgo ,
> maybe RawSyscall will be more efficient?
>

The meaningful comparison is to time.Now, which uses VDSO.  I suppose it is
possible that RawSyscall of clock_gettime with a coarse clock would be
faster than time.Now, but I would be surprised.

Ian

>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcX9mfSFq5gucrTCi0PJyVdLzA2xGXNByDeOGOyaFLo1hA%40mail.gmail.com.

Reply via email to