Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Conversation

@AnnaSasDev
Copy link
Member

@AnnaSasDev AnnaSasDev commented May 6, 2022

Part 1: ColorSystem Overloaders

Updates to the dunders of ColorSystem to support the following functions:

  • str
  • repr
  • bool
  • round
  • divmod
  • iter
  • sum (because all ColorSystem Objects now have an iter)
  • len
  • max (because all ColorSystem Objects now have an iter)
  • min (because all ColorSystem Objects now have an iter)
  • hash
  • copy.copy
  • contains

(List will be further expanded upon during development of this update)

not going to be implemented:

  • hex: will not be implemented, as a Color System is not a single value
  • oct: see hex
  • math.ceil: Not useful for anything specific currently
  • math.floor: see math.ceil
  • math.trunc: see math.ceil
  • int: Color Systems can't be co,verted into a single value
  • float: see int
  • abs: not technically needed for anything, as there is no negative value in any currently implemented Color Notation

@AnnaSasDev AnnaSasDev marked this pull request as draft May 6, 2022 13:26
@AnnaSasDev AnnaSasDev marked this pull request as ready for review May 6, 2022 18:45
@AnnaSasDev
Copy link
Member Author

AnnaSasDev commented May 6, 2022

Part 2 Efficiency Increase:

  • see edits of this comment for speedups
  • Functions to measure speed have been put in the SpeedTest File
  • All speedtests are done with :
    timeit.repeat(lambda: ..., number=1_000_000, repeat=5)

Python 3.10:

  • Conversion: [5.678772300016135, 5.797439599991776, 5.761836799909361, 5.598237099940889, 5.525425500003621]
  • ConversionInline: [5.783179800026119, 5.744663399993442, 5.530574399977922, 5.531668500043452, 5.520124899921939]
  • TextInline: [0.24656250001862645, 0.24608000001171604, 0.25106620002770796, 0.2528545000241138, 0.24517890001880005]
  • TextNested: [0.9830387000110932, 0.962659300013911, 0.9584448999958113, 0.9606724000186659, 0.9621298999991268]
  • TextNestedBig: [2.623604499967769, 2.674881499959156, 2.701220099988859, 2.679547200037632, 2.620247900020331]
  • ObjectCreation: [1.0750685000093654, 1.0828606999712065, 1.0897575999842957, 1.096354900044389, 1.0904685000423342]

Python 3.7:

  • Conversion: [10.5086942, 10.891472, 11.0173803, 10.695808400000004, 10.2424015]
  • ConversionInline: [10.356113999999998, 10.167008800000005, 10.109282899999997, 10.442793500000008, 10.271111000000005]
  • TextInline: [0.40205199999999996, 0.4035426, 0.39924550000000003, 0.39659619999999984, 0.3878290999999998]
  • TextNested: [1.3711424, 1.3489035999999994, 1.3432734999999996, 1.3451619, 1.3526604000000004]
  • TextNestedBig: [3.8732194000000106, 3.8800934999999868, 3.9067500000000166, 3.9612025999999787, 3.9345079]
  • ObjectCreation: [2.0803491, 2.057875, 2.0688705999999994, 2.044169, 2.0986102000000013]

@AnnaSasDev AnnaSasDev marked this pull request as draft May 6, 2022 21:16
@AnnaSasDev AnnaSasDev marked this pull request as ready for review May 7, 2022 13:56
@AnnaSasDev AnnaSasDev merged commit 30d651c into master May 7, 2022
@AnnaSasDev AnnaSasDev deleted the 4.1.0_Proposal branch May 7, 2022 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants