[go-nuts] Re: How long should the profiles be to use with Profile-Guided Optimization (PGO)?

2024-01-23 Thread 'qiulaidongfeng' via golang-nuts
In my experience, if defult.pgo shows hot path. 30s can have a good optimization. On Monday, January 22, 2024 at 11:21:51 PM UTC+8 Agustin Horacio Urquiza Toledo wrote: > Hello, > > I am trying to use PGO in my project and I would like to know how well it > works. I have collected 10 minutes

Re: [go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread Steven Hartland
It's high level, but there's some good stuff mentioned in https://github.com/avelino/awesome-go On Mon, 22 Jan 2024 at 15:23, george looshch wrote: > hi Jason, > > thanks a million for pointing out the vagueness of my question! English > isn’t my mother tongue so now i see where you’re coming fr

[go-nuts] runtime: idea for usse Bump-pointer allocation

2024-01-23 Thread 'qiulaidongfeng' via golang-nuts
See https://github.com/golang/go/issues/51317#issuecomment-1905287203 Bump-pointer allocation is an interesting direction to explore. I will describe, in a bottom-up way, an idea for implementing Bump-pointer allocation. On each P or M, there is a P or M exclusive bumpPtr, and runtime.malloc prio

[go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread george looshch
hey Abu, thanks, looks interesting! On Tuesday, January 23, 2024 at 1:25:17 AM UTC Abu Zakaria wrote: Hi George, I highly suggest you check out the Fiber web framework. You will find the framework interesting. This repo has a list of many examples using Fiber – https://github.com/gofiber/reci

Re: [go-nuts] Re: Good examples of Go back ends?

2024-01-23 Thread george looshch
hi Steven, thanks for the link! As was noted previously, i did a terrible job at expressing my question initially; what i really meant was examples of real-world web server with routing, authentication, DB, etc. On Tuesday, January 23, 2024 at 1:56:04 PM UTC Steven Hartland wrote: > It's high

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2024-01-23 Thread Konstantin Ivaschenko
@Jan You haven't thought of a good way to do it? суббота, 4 ноября 2023 г. в 05:23:51 UTC+3, Luke Crook: > For Windows, could you package and distribute the prebuilt binaries using > an MSI file? (https://nsis.sourceforge.io/Main_Page) > > > > On Fri, Nov 3, 2023 at 12:10 PM Robert Engels > w

[go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread 'Karolina GORNA' via golang-nuts
Hi everyone, I would like to build my Go program and to reverse-engineer it. I would find it easier to build it without the runtime and to statically analyse only the binary of the program. Is it possible and if yes, how please ? Thank you for your time. -- Les informations contenues dans ce

[go-nuts] How to control the way a type is printed out

2024-01-23 Thread notevenhere
I have some types defined within their respective packages deep inside my project folder structure. I create nested instances of these classes and print out their types in turn. These can be seen in the following playground code: https://go.dev/play/p/Juh7-IndBli Running the code, one gets

[go-nuts] Re: How long should the profiles be to use with Profile-Guided Optimization (PGO)?

2024-01-23 Thread Agustin Horacio Urquiza Toledo
Great, I will try with 5 minutes just in case given that the compilation overhead is null. But I have observed that the profiles converge on the hot paths and not exist difference between 2 and 5 minutes. Thanks. El Tuesday, January 23, 2024 a la(s) 5:13:52 AM UTC-3, qiulaidongfeng escribió:

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb
No, this is not possible. This is the case for practically every other language, even C. Unless you intend on inspecting assembly text instead of a real working binary. The symbol table + debug symbols built into the binary by default should make finding the `main.main` function trivial with jus

Re: [go-nuts] How to control the way a type is printed out

2024-01-23 Thread Def Ceb
Is there any particular reason to compare with %T fmt.Sprintf(?) values in the first place? If not, then you could just use type assertions. And the reflect package if really needed. notevenhere: I have some types defined within their respective packages deep inside my project folder structur

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Raffaele Sena
Well, if it's a package/module you could build it as a library archive (go build -buildmode=archive) and then disassemble/decompile the library. On Tue, Jan 23, 2024 at 3:18 PM Def Ceb wrote: > No, this is not possible. This is the case for practically every other > language, even C. Unless you

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb
Interesting proposition, though from what I can tell, you're just going to end up with goobj files, a somewhat obscure internal format of the compiler, rather than a more typical object file format. Raffaele Sena: Well, if it's a package/module you could build it as a library archive (go build

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Raffaele Sena
Yes, but there are tools to access the object files. I.e. you can do "go tool objdump module.a" and get the assembly for your module. On Tue, Jan 23, 2024 at 4:14 PM Def Ceb wrote: > Interesting proposition, though from what I can tell, you're just going > to end up with goobj files, a somewhat

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Def Ceb
Ah, true. Though you'd be limited to analyzing the assembly text instead of a binary. And RE typically involves tools that work on binaries rather than pre-compilation assembly in a text file. Unless there's some way to convert this assembly into a working stand-alone .o/.obj file which could b

Re: [go-nuts] Is it possible to build a Go binary without the runtime ?

2024-01-23 Thread Jaon Dorb
نعم في الأربعاء، 24 يناير 2024 في تمام الساعة 2:50:40 ص UTC+3، كتب Raffaele Sena رسالة نصها: Well, if it's a package/module you could build it as a library archive (go build -buildmode=archive) and then disassemble/decompile the library. On Tue, Jan 23, 2024 at 3:18 PM Def Ceb wrote: No,