Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Docs for SwissDict in wrong order, and questions about it

Abierto
#693 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
julia

Línea de trabajo

Comienza revisando la documentación de SwissDict y el commit del pull request de JuliaLang enlazado. Compara sus afirmaciones sobre el orden y su implementación con las preguntas planteadas sobre el pull request 634 de DataStructures.jl y el artículo enlazado sobre diccionarios ordenados. La tarea estaría terminada cuando haya un cambio de documentación definido y se hayan resuelto las respuestas sobre orden, rendimiento y complejidad.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hi @eulerkochy,

https://github.com/JuliaLang/julia/pull/38167/commits/3f5f9dbf65ed9ec27fe885a675261d5e7873832f

[I can fix that here too.]

When I realized SwissDict is actually ordered, I decided to use it! It seems like an awesome design, I watched the Google video.

Then when I saw the doc issue, it got me thinking, is it for sure an ordered container (not by accident, or is until it isn't for some reason...)? The docs here doesn't say, and for the C++ implementation, I've not tracked it down. I assume you just copy pasted some doc from Dict maybe and didn't change the order. And the C++ is also ordered, not something you added to the design, i.e. I assume you're trying to closely follow it?

I'm copying your implementation to Base, then I saw:

https://github.com/JuliaCollections/DataStructures.jl/pull/634

As of now, the benchmarks aren't favorable.

The little benchmarking I did, using your code, it seemed fast/er, so is that an outdated statement? And should the code at least work? What's your confidence level? At first I was getting OrderedDict into Base, as it's been used for a long time, but I actually found a bug (for recursive Dict, that seem ok for your SwissDict).

Mostly I do not care about the speed, unless it's awful, rather the ordered guarantee (and bug free...).

I did see for your other dict:
https://nextjournal.com/eulerkochy/ordered-dictionary-an-alternative-approach

To guarantee the maintenance of order, we have to compromise on time complexity of deletion.

Is that a statement only about that implementation? If I recall you can keep the same time-complexity for all operations going ordered. Maybe I misremember, or maybe there's a trade-off, and you do intentionally go for worse time-complexity for some less important/rarely used operations, to get performance on the more important ones? Do you know for SwissDict?

Lenguaje dominante
Julia
Estrellas
747
Forks
261
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de JuliaCollections/DataStructures.jl

Todos los issues de JuliaCollections/DataStructures.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.