Git Product home page Git Product logo

Comments (4)

cheatfate avatar cheatfate commented on August 28, 2024

Everything depends on compilation options:

Linux

nim c testtime.nim

-rw-r--r--  1 cheatfate cheatfate 176409 Jan 30 09:01 @m..@[email protected]
-rw-r--r--  1 cheatfate cheatfate  94800 Jan 30 09:01 @m..@[email protected]

nim c -d:release testtime.nim

-rw-r--r--  1 cheatfate cheatfate 137262 Jan 30 09:10 @m..@[email protected]
-rw-r--r--  1 cheatfate cheatfate  75984 Jan 30 09:10 @m..@[email protected]

Windows

nim c testtime.nim

01/30/2020  03:59 PM           174,210 @m..@[email protected]
01/30/2020  03:59 PM            78,856 @m..@[email protected]

nim c -d:release testtime.nim

01/30/2020  03:59 PM           141,748 @m..@[email protected]
01/30/2020  03:59 PM            62,881 @m..@[email protected]

Also asyncloop.nim of course includes asyncmacro2.nim but it do not have any {.async.} procedures.

from nim-chronos.

cheatfate avatar cheatfate commented on August 28, 2024

In @m..@svendor@snim-chronos@[email protected] i see a lot of

#line 134 "I:\\Projects\\nim-beacon-chain\\vendor\\nim-chronos\\chronos\\asyncfutures2.nim"
	nimln_(134, "I:\\Projects\\nim-beacon-chain\\vendor\\nim-chronos\\chronos\\asyncfutures2.nim");

This lines are present for every possible line of code.

The presence of nimln_ in code means that we are compiling asyncloop.nim in debug mode which is also adds size and additional code checks.

from nim-chronos.

arnetheduck avatar arnetheduck commented on August 28, 2024

with --linedir:off --stacktrace:off --linetrace:off:

752	./@m..@svendor@snim-chronos@[email protected]

[arnetheduck@tempus beacon_node]$ grep NIMCALL ./@m..@svendor@snim-chronos@[email protected] | wc
    522    3676   82590

the macro transformations somewhere generate calls to generic functions that get repeated over and over..

from nim-chronos.

arnetheduck avatar arnetheduck commented on August 28, 2024

long story short, asyncloop grows because of generic proc's that get instantiated by the async macro, so every time someone uses async/await in some other module, asyncloop grows..

from nim-chronos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.